WIP: Running the full app in a test case #11
|
@ -223,9 +223,10 @@ def start_i2p_listener():
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
"""Script entry point"""
|
"""Script entry point"""
|
||||||
signal.signal(signal.SIGINT, handler)
|
try:
|
||||||
signal.signal(signal.SIGTERM, handler)
|
multiprocessing.set_start_method('spawn')
|
||||||
|
except RuntimeError:
|
||||||
|
pass
|
||||||
parse_arguments()
|
parse_arguments()
|
||||||
|
|
||||||
logging.basicConfig(
|
logging.basicConfig(
|
||||||
|
@ -233,6 +234,12 @@ def main():
|
||||||
format='[%(asctime)s] [%(levelname)s] %(message)s')
|
format='[%(asctime)s] [%(levelname)s] %(message)s')
|
||||||
logging.info('Starting MiNode')
|
logging.info('Starting MiNode')
|
||||||
|
|
||||||
|
try:
|
||||||
|
signal.signal(signal.SIGINT, handler)
|
||||||
|
signal.signal(signal.SIGTERM, handler)
|
||||||
|
except ValueError:
|
||||||
|
logging.warning('Working outside of the main thread!')
|
||||||
|
|
||||||
logging.info('Data directory: %s', shared.data_directory)
|
logging.info('Data directory: %s', shared.data_directory)
|
||||||
if not os.path.exists(shared.data_directory):
|
if not os.path.exists(shared.data_directory):
|
||||||
try:
|
try:
|
||||||
|
@ -261,5 +268,4 @@ def main():
|
||||||
|
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
multiprocessing.set_start_method('spawn')
|
|
||||||
main()
|
main()
|
||||||
|
|
Loading…
Reference in New Issue
Block a user