fenrir/play zone/daemon.py
2018-07-21 02:04:44 +02:00

13 lines
198 B
Python
Executable File

from time import sleep
from daemonize import Daemonize
pid = "/tmp/test.pid"
def main():
while True:
sleep(5)
daemon = Daemonize(app="test_app", pid=pid, action=main)
daemon.start()