-
-
Notifications
You must be signed in to change notification settings - Fork 56
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
Python version
any
Django version
any
Package version
any
Current behavior (bug description)
set_maintenance_mode
uses normal write, i.e open
+ write
, which may result in a race condition as seen in inventree/InvenTree#6066. An empty maintenance_mode.txt
then leads to a state value is not 0|1
error.
Expected behavior
set_maintenance_mode
uses atomic write, i.e. open
+ write
to temporary file, then mv
temporary file to actual file. I'm sure there is a Python package that provides such a function.
fabiocaccamo and SchrodingersGat
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working
Projects
Status
Done