main.py 484 Bytes
Newer Older
Mattia Bergagio's avatar
Mattia Bergagio committed
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
from run_funs import run

try:
    from common_utils import adapter
except ModuleNotFoundError:
    from common_module.common_utils import adapter

try:
    from common_utils import rabbitmq
except ModuleNotFoundError:
    from common_module.common_utils import rabbitmq

if __name__ == "__main__":
    Worker = rabbitmq.Worker()
    Worker.register_callback(queue="queue_module_controller", callback=run)
    this_adapter = adapter.Adapter(Worker)
    this_adapter.start_listening()