]> git.mxchange.org Git - friendica.git/blobdiff - src/Core/Worker.php
Reenable Twitter/Favorites tests
[friendica.git] / src / Core / Worker.php
index bdc184d2f1524c76ca92a172d4d6feda6c974d7e..7149dd9ce34289545057115702ca4e5fca92e2a2 100644 (file)
@@ -754,7 +754,7 @@ class Worker
                                        }
 
                                        $stamp = (float)microtime(true);
-                                       $jobs = DBA::count('workerqueue', ["`done` AND `executed` > UTC_TIMESTAMP() - INTERVAL ? MINUTE", $interval]);
+                                       $jobs = DBA::count('workerqueue', ["`done` AND `executed` > ?", DateTimeFormat::utc('now - ' . $interval . ' minute')]);
                                        self::$db_duration += (microtime(true) - $stamp);
                                        self::$db_duration_stat += (microtime(true) - $stamp);
                                        $jobs_per_minute[$interval] = number_format($jobs / $interval, 0);
@@ -1183,7 +1183,7 @@ class Worker
                DBA::connect();
 
                DI::flushLogger();
-               $process = DI::process()->create(getmypid());
+               $process = DI::process()->create(getmypid(), basename(__FILE__));
 
                $cycles = 0;
                while (!self::IPCJobsExists($process->pid) && (++$cycles < 100)) {