]> git.mxchange.org Git - friendica.git/commitdiff
urgent bugfix: Wrong function name for locks
authorMichael <heluecht@pirati.ca>
Sun, 8 Jul 2018 08:32:50 +0000 (08:32 +0000)
committerMichael <heluecht@pirati.ca>
Sun, 8 Jul 2018 08:32:50 +0000 (08:32 +0000)
src/Model/Item.php

index 8a96e544057c6e04eb5bb482934f7933c46426d1..162387185ee09a9e9fb8b9ad5084836d277a3773 100644 (file)
@@ -1731,7 +1731,7 @@ class Item extends BaseObject
                }
 
                // To avoid timing problems, we are using locks.
-               $locked = Lock::set('item_insert_activity');
+               $locked = Lock::acquire('item_insert_activity');
                if (!$locked) {
                        logger("Couldn't acquire lock for URI " . $item['uri'] . " - proceeding anyway.");
                }
@@ -1751,7 +1751,7 @@ class Item extends BaseObject
                        return false;
                }
                if ($locked) {
-                       Lock::remove('item_insert_activity');
+                       Lock::release('item_insert_activity');
                }
                return true;
        }