https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41918 --- Comment #32 from David Cook <dcook@prosentient.com.au> --- Thinking about this again... and still not loving the implementation. It feels hacky looking for a comment in the process list. This is a good use case for advisory locking, and it looks like MySQL/MariaDB have support for this kind of cooperative distributed advisory locking: https://dev.mysql.com/doc/refman/8.4/en/locking-functions.html It would be as easy as using these functions: IS_FREE_LOCK("koha_library.report:1"); GET_LOCK("koha_library.report:1",10); The lock is freed when it's released by the process that has the lock or when that connection dies (so if it errored out there's automatic cleanup). It would be pretty simple, and it would allow us to limit running a report so that only one process could do it at a time. -- You are receiving this mail because: You are watching all bug changes.