Async-Transients icon indicating copy to clipboard operation
Async-Transients copied to clipboard

[Feature Request] Update Locking

Open dotsam opened this issue 1 year ago • 0 comments

Is your enhancement related to a problem? Please describe.

This project is designed to update data "asynchronously", but the queue used does not persist across requests/threads, so if the callback is long-running enough, or the site has an even moderate amount of traffic, there's a good chance that the callback will be invoked more than once while the task is running.

This is a likely-enough scenario, that I feel like this functionality should be built in to the library. The cleanest path to this I can see is making the $queue property be backed a (normal, WP Core) transient, and have callbacks added/removed from the queue as they are completed.

Designs

No response

Describe alternatives you've considered

No response

Code of Conduct

  • [X] I agree to follow this project's Code of Conduct

dotsam avatar May 15 '23 23:05 dotsam