Changeset 2752856
- Timestamp:
- 07/07/2022 03:07:01 AM (4 years ago)
- Location:
- fastcomments
- Files:
-
- 40 added
- 3 edited
-
tags/3.12.2 (added)
-
tags/3.12.2/.gitignore (added)
-
tags/3.12.2/LICENSE (added)
-
tags/3.12.2/README.md (added)
-
tags/3.12.2/README.txt (added)
-
tags/3.12.2/admin (added)
-
tags/3.12.2/admin/fastcomments-admin-advanced-settings-view.js (added)
-
tags/3.12.2/admin/fastcomments-admin-advanced-settings-view.php (added)
-
tags/3.12.2/admin/fastcomments-admin-manual-sync-view.js (added)
-
tags/3.12.2/admin/fastcomments-admin-manual-sync-view.php (added)
-
tags/3.12.2/admin/fastcomments-admin-setup-view.js (added)
-
tags/3.12.2/admin/fastcomments-admin-setup-view.php (added)
-
tags/3.12.2/admin/fastcomments-admin-sso-view.css (added)
-
tags/3.12.2/admin/fastcomments-admin-sso-view.js (added)
-
tags/3.12.2/admin/fastcomments-admin-sso-view.php (added)
-
tags/3.12.2/admin/fastcomments-admin-support-view.php (added)
-
tags/3.12.2/admin/fastcomments-admin-view.php (added)
-
tags/3.12.2/admin/fastcomments-admin.css (added)
-
tags/3.12.2/admin/fastcomments-admin.php (added)
-
tags/3.12.2/admin/images (added)
-
tags/3.12.2/admin/images/api.png (added)
-
tags/3.12.2/admin/images/crown.png (added)
-
tags/3.12.2/admin/images/css.png (added)
-
tags/3.12.2/admin/images/debugging.png (added)
-
tags/3.12.2/admin/images/download.png (added)
-
tags/3.12.2/admin/images/home.png (added)
-
tags/3.12.2/admin/images/logo-50.png (added)
-
tags/3.12.2/admin/images/logo.png (added)
-
tags/3.12.2/admin/images/settings.png (added)
-
tags/3.12.2/admin/images/support.png (added)
-
tags/3.12.2/admin/images/sync-status.png (added)
-
tags/3.12.2/admin/images/sync.png (added)
-
tags/3.12.2/core (added)
-
tags/3.12.2/core/FastCommentsIntegrationCore.php (added)
-
tags/3.12.2/core/FastCommentsWordPressIntegration.php (added)
-
tags/3.12.2/fastcomments-wordpress-plugin.php (added)
-
tags/3.12.2/public (added)
-
tags/3.12.2/public/fastcomments-public.php (added)
-
tags/3.12.2/public/fastcomments-widget-view.php (added)
-
tags/3.12.2/uninstall.php (added)
-
trunk/README.txt (modified) (2 diffs)
-
trunk/core/FastCommentsIntegrationCore.php (modified) (3 diffs)
-
trunk/fastcomments-wordpress-plugin.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
fastcomments/trunk/README.txt
r2746763 r2752856 4 4 Requires at least: 4.6 5 5 Tested up to: 6.0 6 Stable tag: 3.12. 16 Stable tag: 3.12.2 7 7 Requires PHP: 5.2.5 8 8 License: GPLv2 or later … … 88 88 == Changelog == 89 89 90 = 3.12.2 = 91 * Bugfixes on initial sync after changing data location. 92 90 93 = 3.12.1 = 91 94 * Improved support for keeping your data in the EU. -
fastcomments/trunk/core/FastCommentsIntegrationCore.php
r2678152 r2752856 234 234 } 235 235 236 private function tryAckLock($name, $windowSeconds) { 237 $secondsRemaining = $windowSeconds; 238 $retryInterval = 1; 239 $gotLock = $this->canAckLock($name, $windowSeconds); 240 while (!$gotLock && $secondsRemaining > 0) { 241 $gotLock = $this->canAckLock($name, $windowSeconds); 242 if (!$gotLock) { 243 $secondsRemaining = $secondsRemaining - $retryInterval; 244 sleep($retryInterval); 245 } 246 } 247 return $gotLock; 248 } 249 250 private function resetLock($name, $windowSeconds) { 251 $settingName = $this->getLockName($name); 252 $this->setSettingValue($settingName, time() + $windowSeconds); 253 } 254 236 255 private function getLockName($name) { 237 256 return "lock_$name"; … … 249 268 */ 250 269 $this->log('debug', 'Starting to send comments'); 251 if (!$this->canAckLock("commandSendComments", 60)) { 270 // We use try and not "canAckLock" in case the cron runs within a second of sync, don't let cron fail. 271 if (!$this->tryAckLock("commandSendComments", 60)) { 252 272 $this->log('debug', 'Can not send right now, waiting for previous attempt to finish.'); 253 273 return 'LOCK_WAITING'; … … 338 358 $this->log('error', "Failed to get comments to send: status=[$status] comments=[$comments]"); 339 359 } 340 $this-> clearLock("commandSendComments");360 $this->resetLock("commandSendComments", 1); // Instead of calling clearLock, prevent race condition on page refresh during setup where same chunk can get submitted twice. Not the worst thing in the world but looks weird to user. 341 361 $this->log('debug', 'Done sending comments'); 342 362 return $countSynced; -
fastcomments/trunk/fastcomments-wordpress-plugin.php
r2746763 r2752856 4 4 Plugin URI: https://fastcomments.com 5 5 Description: Live Comments, Fast. A comment system that will delight your users and developers. 6 Version: 3.12. 16 Version: 3.12.2 7 7 Author: winrid @ FastComments 8 8 License: GPL-2.0+ … … 14 14 } 15 15 16 $FASTCOMMENTS_VERSION = 3.12 1;16 $FASTCOMMENTS_VERSION = 3.122; 17 17 18 18 require_once plugin_dir_path(__FILE__) . 'admin/fastcomments-admin.php';
Note: See TracChangeset
for help on using the changeset viewer.