-
Notifications
You must be signed in to change notification settings - Fork 6
/
run.py
27 lines (21 loc) · 774 Bytes
/
run.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
import configuration
import time
import multiprocessing
import os
# Create logging directories
if not os.path.exists(configuration.logging_details['CHK_POINT_DIR']):
os.makedirs(configuration.logging_details['CHK_POINT_DIR'])
if not os.path.exists(configuration.logging_details['LOG_FILE_PATH']):
os.makedirs(configuration.logging_details['LOG_FILE_PATH'])
source_list = []
for k, v in configuration.source_details.items():
if v == True:
print("%s is selected to be ingested" % (k))
source_list.append(k)
else:
print("%s is selected to not be ingested" % (k))
print("\nStarting main process shortly in 3 seconds\n")
time.sleep(3)
for i in source_list:
p = multiprocessing.Process(target=lambda: __import__(i))
p.start()