]> git.mxchange.org Git - friendica.git/blobdiff - bin/worker.php
Coding standards
[friendica.git] / bin / worker.php
index ad70bb176a2a4efd39a8a1b76b0e55a2af031052..877f1333e040d37fd1e221afe4c42e5e58082214 100755 (executable)
@@ -21,8 +21,6 @@
  * Starts the background processing
  */
 
-use Friendica\Network\HTTPException\ForbiddenException;
-
 if (php_sapi_name() !== 'cli') {
        header($_SERVER["SERVER_PROTOCOL"] . ' 403 Forbidden');
        exit();
@@ -83,8 +81,10 @@ if ($spawn) {
 
 $run_cron = !array_key_exists('n', $options) && !array_key_exists('no_cron', $options);
 
-Worker::processQueue($run_cron);
+$process = DI::process()->create(getmypid(), basename(__FILE__));
+
+Worker::processQueue($run_cron, $process);
 
-Worker::unclaimProcess();
+Worker::unclaimProcess($process);
 
-DI::process()->end();
+DI::process()->delete($process);