Merge pull request #4261 from annando/bugfix-process

Avoid sql error in process handling
2022.09-rc
Hypolite Petovan 2018-01-17 10:45:16 -05:00 zatwierdzone przez GitHub
commit ca0a261e08
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 4AEE18F83AFDEB23
1 zmienionych plików z 5 dodań i 1 usunięć

Wyświetl plik

@ -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()]);
}