Please sign in to comment.
Stop leaving locks behind
Previously if some user cancelled his request (simply by pressing Stop button in his browser), then the script will receive a TERM signal or the like. This means that some locks could be left behind, which required someone to unlock the wiki manually (by using Unlock Wiki action). Now we remove these locks automatically! However, some tasks might want to handle such situations gracefully. That's why %LockCleaners hash was added. Use lock name as the key and put a coderef as a value. If SIGTERM (or a bunch of other signals) is received, then it will run this code, which, supposedly, cleans all of the stuff after it. Private Wiki Extension was changed according to that, so you can see it in action. Also, tests added!
- Loading branch information...
Showing with 72 additions and 3 deletions.