Commit 7bdb9922 authored by Sebastian Kummer's avatar Sebastian Kummer

ZP-834 Remove SINK_FORCERECHECK configuration option and implementation.

Released under the Affero GNU General Public License (AGPL) version 3.
parent 19b6ce49
...@@ -165,11 +165,6 @@ ...@@ -165,11 +165,6 @@
// a higher value if you have a high load on the server. // a higher value if you have a high load on the server.
define('PING_INTERVAL', 30); define('PING_INTERVAL', 30);
// Interval in seconds to force a re-check of potentially missed notifications when
// using a changes sink. Default are 300 seconds (every 5 min).
// This can also be disabled by setting it to false
define('SINK_FORCERECHECK', 300);
// Set the fileas (save as) order for contacts in the webaccess/webapp/outlook. // Set the fileas (save as) order for contacts in the webaccess/webapp/outlook.
// It will only affect new/modified contacts on the mobile which then are synced to the server. // It will only affect new/modified contacts on the mobile which then are synced to the server.
// Possible values are: // Possible values are:
......
...@@ -462,7 +462,7 @@ class SyncCollections implements Iterator { ...@@ -462,7 +462,7 @@ class SyncCollections implements Iterator {
// use changes sink where available // use changes sink where available
$changesSink = false; $changesSink = false;
$forceRealExport = 0;
// do not create changessink if there are no folders // do not create changessink if there are no folders
if (!empty($classes) && ZPush::GetBackend()->HasChangesSink()) { if (!empty($classes) && ZPush::GetBackend()->HasChangesSink()) {
$changesSink = true; $changesSink = true;
...@@ -523,16 +523,6 @@ class SyncCollections implements Iterator { ...@@ -523,16 +523,6 @@ class SyncCollections implements Iterator {
// Use changes sink if available // Use changes sink if available
if ($changesSink) { if ($changesSink) {
// in some occasions we do realize a full export to see if there are pending changes
// every 5 minutes this is also done to see if there were "missed" notifications
if (SINK_FORCERECHECK !== false && $forceRealExport+SINK_FORCERECHECK <= $now) {
if ($this->CountChanges($onlyPingable)) {
ZLog::Write(LOGLEVEL_DEBUG, "SyncCollections->CheckForChanges(): Using ChangesSink but found relevant changes on regular export");
return true;
}
$forceRealExport = $now;
}
ZPush::GetTopCollector()->AnnounceInformation(sprintf("Sink %d/%ds on %s", ($now-$started), $lifetime, $checkClasses)); ZPush::GetTopCollector()->AnnounceInformation(sprintf("Sink %d/%ds on %s", ($now-$started), $lifetime, $checkClasses));
$notifications = ZPush::GetBackend()->ChangesSink($nextInterval); $notifications = ZPush::GetBackend()->ChangesSink($nextInterval);
......
...@@ -301,12 +301,6 @@ class ZPush { ...@@ -301,12 +301,6 @@ class ZPush {
if (!is_array($specialLogUsers)) if (!is_array($specialLogUsers))
throw new FatalMisconfigurationException("The WBXML log users is not an array."); throw new FatalMisconfigurationException("The WBXML log users is not an array.");
if (!defined('SINK_FORCERECHECK')) {
define('SINK_FORCERECHECK', 300);
}
else if (SINK_FORCERECHECK !== false && (!is_int(SINK_FORCERECHECK) || SINK_FORCERECHECK < 1))
throw new FatalMisconfigurationException("The SINK_FORCERECHECK value must be 'false' or a number higher than 0.");
if (!defined('SYNC_CONTACTS_MAXPICTURESIZE')) { if (!defined('SYNC_CONTACTS_MAXPICTURESIZE')) {
define('SYNC_CONTACTS_MAXPICTURESIZE', 49152); define('SYNC_CONTACTS_MAXPICTURESIZE', 49152);
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment