Merge branch 'patch-20181025a' into 'dev'

Add entropy to queue worker - and fix requeuing of expired tasks

See merge request hubzilla/core!1350
This commit is contained in:
Mario 2018-10-26 08:15:11 +02:00
commit 6326a50d20

View File

@ -60,7 +60,8 @@ class Master {
$k = explode('_',$worker['k']); $k = explode('_',$worker['k']);
q("delete from config where cat='queueworkers' and k='%s'", q("delete from config where cat='queueworkers' and k='%s'",
'workerstarted_'.$k[1]); 'workerstarted_'.$k[1]);
q("update config set k='workitem' where cat='queuework' and k='%s'", q("update config set k='%s' where cat='queuework' and k='%s'",
dbesc(uniqid('workitem:',true)),
'workitem_'.$k[1]); 'workitem_'.$k[1]);
unset($workers[$idx]); unset($workers[$idx]);
} }
@ -69,7 +70,7 @@ class Master {
return false; return false;
} }
} }
return uniqid(); return uniqid('',true);
} }