Skip to content

Alternative (better) lock when adding new tasks - #602

Merged
aristath merged 10 commits into
developfrom
filip/alternative-lock
Sep 18, 2025
Merged

Alternative (better) lock when adding new tasks#602
aristath merged 10 commits into
developfrom
filip/alternative-lock

Conversation

@ilicfilip

Copy link
Copy Markdown
Collaborator

This PR improves fix for the issue described in #515

Very rare but I am still getting duplicated tasks sometimes, most of the time it was "Perform all updates", so the initial fix needs to be improved.

Previously transient was used to make sure lock expires, but the downside is that below the hood set_transient uses update_option which is not good enough. Now the set_transient is replaced with add_option, which prevents duplicates (I have both checked the Core code and made tests) so finally adding duplicates should be prevented.

@ilicfilip ilicfilip added this to the 1.9.0 milestone Sep 10, 2025
@github-actions

github-actions Bot commented Sep 10, 2025

Copy link
Copy Markdown
Contributor

Test on Playground
Test this pull request on the Playground
or download the zip

@ilicfilip
ilicfilip requested a review from aristath September 17, 2025 11:21
@ilicfilip
ilicfilip marked this pull request as ready for review September 17, 2025 11:21
Comment thread classes/class-suggested-tasks-db.php Outdated
@aristath
aristath merged commit 94a3f47 into develop Sep 18, 2025
26 of 28 checks passed
@aristath
aristath deleted the filip/alternative-lock branch September 18, 2025 09:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants