diff --git a/Catow/main.py b/Catow/main.py index c3cff70..959e55a 100644 --- a/Catow/main.py +++ b/Catow/main.py @@ -32,7 +32,7 @@ def run_server(): async def watch_topic(): while True: try: - response = requests.get(f'{CatowConfig().cmd_args.camundaurl}/engine-rest/external-task/count?topicName={CatowConfig().cmd_args.topic}¬locked=true&active=true&withRetriesLeft=true') + response = requests.get(f'{CatowConfig().cmd_args.camundaurl}/engine-rest/external-task/count?topicName={CatowConfig().cmd_args.topic}¬locked=true&active=true&withRetriesLeft=true', timeout=(3.05, 5)) response.raise_for_status() #print(response.text) response_body = json.loads(response.text) @@ -40,7 +40,7 @@ async def watch_topic(): if count > 0: print(f"Start Robot for amount of process instances: {count}") try: - response = requests.get(CatowConfig().cmd_args.roboturl) + response = requests.get(CatowConfig().cmd_args.roboturl, timeout=(3.05, 5)) response.raise_for_status() except Exception as e: print(f'[WARN] Failed to trigger robot:\n{e}')