mirror of
https://git.sekbaer.de/Friendica/friendica.git
synced 2025-06-17 04:15:15 +02:00
Add additional checks for the worker
This commit is contained in:
parent
cc7d5602a9
commit
bd88179419
5 changed files with 36 additions and 1 deletions
|
@ -1259,6 +1259,24 @@ class dba {
|
|||
return $data;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Returns the error number of the last query
|
||||
*
|
||||
* @return string Error number (0 if no error)
|
||||
*/
|
||||
public static function errorNo() {
|
||||
return self::$dbo->errorno;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Returns the error message of the last query
|
||||
*
|
||||
* @return string Error message ('' if no error)
|
||||
*/
|
||||
public static function errorMessage() {
|
||||
return self::$dbo->error;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Closes the current statement
|
||||
*
|
||||
|
|
|
@ -248,7 +248,9 @@ function poller_execute($queue) {
|
|||
poller_exec_function($queue, $funcname, $argv);
|
||||
|
||||
$stamp = (float)microtime(true);
|
||||
dba::update('workerqueue', array('done' => true), array('id' => $queue["id"]));
|
||||
if (dba::update('workerqueue', array('done' => true), array('id' => $queue["id"]))) {
|
||||
Config::set('system', 'last_poller_execution', datetime_convert());
|
||||
}
|
||||
$poller_db_duration = (microtime(true) - $stamp);
|
||||
} else {
|
||||
logger("Function ".$funcname." does not exist");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue