-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathfast_app.py
36 lines (28 loc) · 1.38 KB
/
fast_app.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 os
pckg_dir = os.path.abspath(os.path.join(os.path.dirname(os.path.abspath(__file__)), '..', '..'))
sys.path.append(pckg_dir)
import logging
from .RightsManagement import RightsManagement
from ..utils import ToolFastApp, load_yaml, log_config
if __name__ == '__main__':
log_config()
logging.info("Starting the T12_RightsManagement process...")
# Load the configuration parameters from the config file
params = load_yaml("Tools/parameters.yaml")["T12_RightsManagement"]
# Initialize the Leds object
rights_management = RightsManagement(
input_url_api_request = params["input_url_api_request"],
input_person_reconized_file = params["input_person_reconized_file"],
input_people_folder = params["input_people_folder"],
output_documents_autorized_file = params["output_documents_autorized_file"],
output_actions_autorized_file = params["output_actions_autorized_file"]
)
logging.info("T12_RightsManagement object initialized successfully.")
T12_fast_app = ToolFastApp(
command_dict = {"start": rights_management.start},
get_status_function = rights_management.get_running,
status_file = "Tools/T12_RightsManagement/fast_com/status.txt",
command_file = "Tools/T12_RightsManagement/fast_com/command.txt"
)
T12_fast_app.run()