define ( 'FRIENDICA_PLATFORM', 'Friendica');
define ( 'FRIENDICA_CODENAME', 'Asparagus');
define ( 'FRIENDICA_PLATFORM', 'Friendica');
define ( 'FRIENDICA_CODENAME', 'Asparagus');
define ( 'DFRN_PROTOCOL_VERSION', '2.23' );
define ( 'DB_UPDATE_VERSION', 1234 );
define ( 'DFRN_PROTOCOL_VERSION', '2.23' );
define ( 'DB_UPDATE_VERSION', 1234 );
- proc_run(PRIORITY_CRITICAL, 'include/dbupdate.php');
+ // When we cannot execute the database update via the worker, we will do it directly
+ if (!proc_run(PRIORITY_CRITICAL, 'include/dbupdate.php') && $via_worker) {
+ update_db(get_app());
+ }
call_hooks("proc_run", $arr);
if (!$arr['run_cmd'] || ! count($args)) {
call_hooks("proc_run", $arr);
if (!$arr['run_cmd'] || ! count($args)) {
$parameters = json_encode($argv);
$found = dba::exists('workerqueue', array('parameter' => $parameters, 'done' => false));
$parameters = json_encode($argv);
$found = dba::exists('workerqueue', array('parameter' => $parameters, 'done' => false));
if (!$found) {
dba::insert('workerqueue', array('parameter' => $parameters, 'created' => $created, 'priority' => $priority));
}
// Should we quit and wait for the poller to be called as a cronjob?
if ($dont_fork) {
if (!$found) {
dba::insert('workerqueue', array('parameter' => $parameters, 'created' => $created, 'priority' => $priority));
}
// Should we quit and wait for the poller to be called as a cronjob?
if ($dont_fork) {
}
// If there is a lock then we don't have to check for too much worker
if (!Lock::set('poller_worker', 0)) {
}
// If there is a lock then we don't have to check for too much worker
if (!Lock::set('poller_worker', 0)) {
}
// Now call the poller to execute the jobs that we just added to the queue
$args = array("include/poller.php", "no_cron");
$a->proc_run($args);
}
// Now call the poller to execute the jobs that we just added to the queue
$args = array("include/poller.php", "no_cron");
$a->proc_run($args);