Avoid sql error in process handling

This commit is contained in:
Michael 2018-01-17 14:10:30 +00:00
parent a526573075
commit fbb024d151

View file

@ -26,9 +26,13 @@ class Process extends BaseObject
{
$return = true;
if (is_null($pid)) {
$pid = getmypid();
}
dba::transaction();
if (!dba::exists('process', ['pid' => getmypid()])) {
if (!dba::exists('process', ['pid' => $pid])) {
$return = dba::insert('process', ['pid' => $pid, 'command' => $command, 'created' => datetime_convert()]);
}