-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathmain.py
More file actions
executable file
·32 lines (26 loc) · 750 Bytes
/
main.py
File metadata and controls
executable file
·32 lines (26 loc) · 750 Bytes
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
28
29
30
31
32
#!/usr/bin/python3
import glob
import os.path
import threading
import time
import api.api
import data.dockerctl
import manager.config
def main():
fileList = glob.glob(os.path.join(os.getcwd(),'*.lck'), recursive=False)
for filePath in fileList:
print("Removing lock file: " + filePath)
try:
os.remove(filePath)
except:
print("Error while deleting file : ", filePath)
threading.Thread(target=api.api.start).start()
data.dockerctl.start_database()
while True:
run_loop()
def run_loop():
parsed_yaml = manager.config.get_config()
manager.config.run_modules(parsed_yaml)
time.sleep(parsed_yaml["Manager"]["UpdatePeriod"])
if __name__ == "__main__":
main()