-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.py
36 lines (26 loc) · 938 Bytes
/
main.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
28
29
30
31
32
33
34
35
36
import sys
import connector.data_source
import connector.data_service
import connector.export
import connector.export_delta
if __name__ == '__main__':
if len(sys.argv) < 1:
sys.exit(1)
if len(sys.argv) > 1:
if len(sys.argv) > 2 and sys.argv[2] == '--health-check':
sys.exit()
if sys.argv[1] == 'data-source':
connector.data_source.failed_call_to_container_api()
connector.data_source.append_sample_products()
connector.data_source.log_something()
connector.data_source.read_env_var_and_exit()
sys.exit()
if sys.argv[1] == 'data-service':
connector.data_service.data_service()
sys.exit()
if sys.argv[1] == 'export':
connector.export.export()
sys.exit()
if sys.argv[1] == 'export-delta':
connector.export_delta.export()
sys.exit()