Skip to content

Commit

Permalink
Equivalent but simpler to read watchdog env variable logic
Browse files Browse the repository at this point in the history
  • Loading branch information
samschott committed Oct 29, 2023
1 parent 09e321c commit 8eb75d6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/maestral/daemon.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,9 +69,9 @@

# systemd environment
NOTIFY_SOCKET = os.getenv("NOTIFY_SOCKET")
WATCHDOG_PID = int(os.getenv("WATCHDOG_PID", os.getpid()))
WATCHDOG_USEC = os.getenv("WATCHDOG_USEC")
IS_WATCHDOG = WATCHDOG_USEC and WATCHDOG_PID == os.getpid()
WATCHDOG_PID = os.getenv("WATCHDOG_PID")
IS_WATCHDOG = WATCHDOG_PID is None or WATCHDOG_PID == str(os.getpid())


URI = "PYRO:maestral.{0}@{1}"
Expand Down

0 comments on commit 8eb75d6

Please sign in to comment.