mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-12-24 23:58:54 +01:00
rate limit notifications push-message-cleanup to once per hour as they lock the notifications table and block each other
This commit is contained in:
parent
2356c6e0dd
commit
92ffca5a7a
@ -121,6 +121,14 @@ class notifications_push implements Json\PushBackend
|
||||
*/
|
||||
protected static function cleanup_push_msgs()
|
||||
{
|
||||
// rate limit the deletes: max. once per hour for the instance
|
||||
$stamp = date('YmdH');
|
||||
if (Api\Cache::getInstance(__CLASS__, __FUNCTION__) === $stamp)
|
||||
{
|
||||
return;
|
||||
}
|
||||
Api\Cache::setInstance(__CLASS__, __FUNCTION__, $stamp);
|
||||
|
||||
if (($ts = self::$db->from_unixtime(Api\Session::heartbeat_limit())))
|
||||
{
|
||||
try {
|
||||
|
Loading…
Reference in New Issue
Block a user