mirror of
https://github.com/friendica/friendica
synced 2024-11-20 15:03:41 +00:00
Merge remote-tracking branch 'upstream/3.5.2rc' into 1706-lock
This commit is contained in:
commit
2d229ad856
5 changed files with 16 additions and 7 deletions
9
boot.php
9
boot.php
|
@ -40,7 +40,7 @@ define ( 'FRIENDICA_PLATFORM', 'Friendica');
|
||||||
define ( 'FRIENDICA_CODENAME', 'Asparagus');
|
define ( 'FRIENDICA_CODENAME', 'Asparagus');
|
||||||
define ( 'FRIENDICA_VERSION', '3.5.2-rc' );
|
define ( 'FRIENDICA_VERSION', '3.5.2-rc' );
|
||||||
define ( 'DFRN_PROTOCOL_VERSION', '2.23' );
|
define ( 'DFRN_PROTOCOL_VERSION', '2.23' );
|
||||||
define ( 'DB_UPDATE_VERSION', 1226 );
|
define ( 'DB_UPDATE_VERSION', 1227 );
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Constant with a HTML line break.
|
* @brief Constant with a HTML line break.
|
||||||
|
@ -457,6 +457,13 @@ if (!defined("SIGTERM")) {
|
||||||
define("SIGTERM", 15);
|
define("SIGTERM", 15);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Depending on the PHP version this constant does exist - or not.
|
||||||
|
* See here: http://php.net/manual/en/curl.constants.php#117928
|
||||||
|
*/
|
||||||
|
if (!defined('CURLE_OPERATION_TIMEDOUT')) {
|
||||||
|
define('CURLE_OPERATION_TIMEDOUT', CURLE_OPERATION_TIMEOUTED);
|
||||||
|
}
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* Reverse the effect of magic_quotes_gpc if it is enabled.
|
* Reverse the effect of magic_quotes_gpc if it is enabled.
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
-- ------------------------------------------
|
-- ------------------------------------------
|
||||||
-- Friendica 3.5.2-rc (Asparagus)
|
-- Friendica 3.5.2-rc (Asparagus)
|
||||||
-- DB_UPDATE_VERSION 1226
|
-- DB_UPDATE_VERSION 1227
|
||||||
-- ------------------------------------------
|
-- ------------------------------------------
|
||||||
|
|
||||||
|
|
||||||
|
@ -1115,6 +1115,7 @@ CREATE TABLE IF NOT EXISTS `workerqueue` (
|
||||||
`pid` int(11) NOT NULL DEFAULT 0,
|
`pid` int(11) NOT NULL DEFAULT 0,
|
||||||
`executed` datetime NOT NULL DEFAULT '0001-01-01 00:00:00',
|
`executed` datetime NOT NULL DEFAULT '0001-01-01 00:00:00',
|
||||||
PRIMARY KEY(`id`),
|
PRIMARY KEY(`id`),
|
||||||
|
INDEX `pid` (`pid`),
|
||||||
INDEX `priority_created` (`priority`,`created`)
|
INDEX `priority_created` (`priority`,`created`)
|
||||||
) DEFAULT COLLATE utf8mb4_general_ci;
|
) DEFAULT COLLATE utf8mb4_general_ci;
|
||||||
|
|
||||||
|
|
|
@ -1742,6 +1742,7 @@ function db_definition() {
|
||||||
),
|
),
|
||||||
"indexes" => array(
|
"indexes" => array(
|
||||||
"PRIMARY" => array("id"),
|
"PRIMARY" => array("id"),
|
||||||
|
"pid" => array("pid"),
|
||||||
"priority_created" => array("priority", "created"),
|
"priority_created" => array("priority", "created"),
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
|
@ -555,7 +555,7 @@ function poller_worker_process() {
|
||||||
$highest_priority = 0;
|
$highest_priority = 0;
|
||||||
|
|
||||||
if (poller_passing_slow($highest_priority)) {
|
if (poller_passing_slow($highest_priority)) {
|
||||||
dba::p('LOCK TABLES `workerqueue` WRITE');
|
dba::e('LOCK TABLES `workerqueue` WRITE');
|
||||||
|
|
||||||
// Are there waiting processes with a higher priority than the currently highest?
|
// Are there waiting processes with a higher priority than the currently highest?
|
||||||
$r = q("SELECT * FROM `workerqueue`
|
$r = q("SELECT * FROM `workerqueue`
|
||||||
|
@ -577,7 +577,7 @@ function poller_worker_process() {
|
||||||
return $r;
|
return $r;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
dba::p('LOCK TABLES `workerqueue` WRITE');
|
dba::e('LOCK TABLES `workerqueue` WRITE');
|
||||||
}
|
}
|
||||||
|
|
||||||
// If there is no result (or we shouldn't pass lower processes) we check without priority limit
|
// If there is no result (or we shouldn't pass lower processes) we check without priority limit
|
||||||
|
@ -587,7 +587,7 @@ function poller_worker_process() {
|
||||||
|
|
||||||
// We only unlock the tables here, when we got no data
|
// We only unlock the tables here, when we got no data
|
||||||
if (!dbm::is_result($r)) {
|
if (!dbm::is_result($r)) {
|
||||||
dba::p('UNLOCK TABLES');
|
dba::e('UNLOCK TABLES');
|
||||||
}
|
}
|
||||||
|
|
||||||
return $r;
|
return $r;
|
||||||
|
@ -607,7 +607,7 @@ function poller_claim_process($queue) {
|
||||||
|
|
||||||
$success = dba::update('workerqueue', array('executed' => datetime_convert(), 'pid' => $mypid),
|
$success = dba::update('workerqueue', array('executed' => datetime_convert(), 'pid' => $mypid),
|
||||||
array('id' => $queue["id"], 'pid' => 0));
|
array('id' => $queue["id"], 'pid' => 0));
|
||||||
dba::p('UNLOCK TABLES');
|
dba::e('UNLOCK TABLES');
|
||||||
|
|
||||||
if (!$success) {
|
if (!$success) {
|
||||||
logger("Couldn't update queue entry ".$queue["id"]." - skip this execution", LOGGER_DEBUG);
|
logger("Couldn't update queue entry ".$queue["id"]." - skip this execution", LOGGER_DEBUG);
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
define('UPDATE_VERSION' , 1226);
|
define('UPDATE_VERSION' , 1227);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
|
|
Loading…
Reference in a new issue