When running this under uwsgi with multiple processes (e.g. -p 2), you start seeing errors like this:
File "./server.py", line 385, in save
os.rename(list_path + "~", list_path)
FileNotFoundError: [Errno 2] No such file or directory: '/srv/serverlist/static/list.json~' -> '/srv/serverlist/static/list.json'
We do have a lock to prevent multiple threads from doing this, but not to prevent multiple workers from doing this.
When running this under uwsgi with multiple processes (e.g.
-p 2
), you start seeing errors like this:We do have a lock to prevent multiple threads from doing this, but not to prevent multiple workers from doing this.