OptionLock final class
Minn\Runtime\OptionLock · public/minn/src/Minn/Runtime/OptionLock.php · 23 lines
A lock the reference keeps as an option row (the revision upgrade's "revision-upgrade-{id}", the comment type batch's "update_comment_type.lock"; tests/tools/side-effects.php): inserted only when no row holds the name, its value the time it was taken; one held for less than an hour keeps others out, an older one is taken over. The holder writes the time again through update_option, and deletes the row when done.
Uses 2
Used by 2
Constants and properties
| private | HELD_SECONDS = 3600 | How long a held lock keeps others out, in seconds. |
Public
Nothing matches.