Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- from daemon import DaemonContext as Daemon
- import time
- import sys
- def worker():
- for i in range(10):
- print(i)
- time.sleep(1)
- print('Worker killed')
- if __name__ == '__main__':
- with Daemon(stdout=sys.stdout):
- worker()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement