Change the library to one that supports expiration of locks, since I observed deadlocks when running the server for sometime.
Move the locking to a separate decorator and apply it only to the top level sync tasks, since I only need it to lock the periodic syncing tasks.
Note that I'm still not positive this complexity is worth over the benefit of running multiple workers of the app. I may revisit and remove locking altogether later.
Note that I'm still not positive this complexity is worth over the benefit of running multiple workers of the app. I may revisit and remove locking altogether later.