]> git.mxchange.org Git - friendica.git/commitdiff
We don't poll, we work ... Bugfix for renamed config value.
authorMichael <heluecht@pirati.ca>
Mon, 4 Jun 2018 21:17:37 +0000 (21:17 +0000)
committerMichael <heluecht@pirati.ca>
Mon, 4 Jun 2018 21:17:37 +0000 (21:17 +0000)
mod/admin.php
mod/worker.php

index 8e7dfc1f4923fae09e416a01c0cd72a72dbb9ea7..e05dae540fd94872b87fe7dad17dd600308e4c55 100644 (file)
@@ -801,7 +801,7 @@ function admin_page_summary(App $a)
                $warningtext[] = L10n::t('The database update failed. Please run "php bin/console.php dbstructure update" from the command line and have a look at the errors that might appear.');
        }
 
-       $last_worker_call = Config::get('system', 'last_poller_execution', false);
+       $last_worker_call = Config::get('system', 'last_worker_execution', false);
        if (!$last_worker_call) {
                $showwarning = true;
                $warningtext[] = L10n::t('The worker was never executed. Please check your database structure!');
index 1bd58807895fab1ae5c6782964925ab98151774d..7b2acad6cdc10dcf6b464ef319e6d6a3221f0fb2 100644 (file)
@@ -40,7 +40,9 @@ function worker_init(){
                // But since it doesn't destroy anything, we just try to get more execution time in any way.
                set_time_limit(0);
 
-               if (poller_claim_process($r[0])) {
+               $fields = ['executed' => DateTimeFormat::utcNow(), 'pid' => getmypid(), 'done' => false];
+               $condition =  ['id' => $r[0]["id"], 'pid' => 0];
+               if (dba::update('workerqueue', $fields, $condition)) {
                        Worker::execute($r[0]);
                }
        }