Skip to content

Commit

Permalink
Fix cold-start with no livedata dir
Browse files Browse the repository at this point in the history
  • Loading branch information
coldino committed Aug 9, 2023
1 parent 702a9e6 commit 4f6b121
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
3 changes: 3 additions & 0 deletions automate/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@
logging.basicConfig(level=logging.INFO)
logger = logging.getLogger('automate')

from pathlib import Path
Path('livedata').mkdir(exist_ok=True)

from utils.flockish import ensure_process_lock, set_lock_path
set_lock_path("livedata/automate.lock")
ensure_process_lock()
Expand Down
3 changes: 3 additions & 0 deletions manage/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@
logging.basicConfig(level=logging.INFO)
logger = logging.getLogger('manage')

from pathlib import Path
Path('livedata').mkdir(exist_ok=True)

from utils.flockish import ensure_process_lock, set_lock_path
set_lock_path("livedata/manage.lock")
ensure_process_lock()
Expand Down

0 comments on commit 4f6b121

Please sign in to comment.