21 lines
662 B
Python
21 lines
662 B
Python
|
|
"""Minimal executable bootstrap; business logic is compiled separately."""
|
||
|
|
import multiprocessing
|
||
|
|
import os
|
||
|
|
import sys
|
||
|
|
|
||
|
|
if __name__ == '__main__':
|
||
|
|
multiprocessing.freeze_support()
|
||
|
|
os.environ['MONITOR_DESKTOP'] = '1'
|
||
|
|
try:
|
||
|
|
from monitor_runtime.launcher import main
|
||
|
|
raise SystemExit(main())
|
||
|
|
except SystemExit:
|
||
|
|
raise
|
||
|
|
except Exception as exc:
|
||
|
|
import logging
|
||
|
|
logging.exception('Monitor failed')
|
||
|
|
if os.name == 'nt' and '--worker' not in sys.argv and '--self-test' not in sys.argv:
|
||
|
|
from monitor_runtime.windows import message
|
||
|
|
message(str(exc), True)
|
||
|
|
raise SystemExit(1)
|