From b024cbc58d503402f92d5751b1d8f510eb3e0489 Mon Sep 17 00:00:00 2001 From: Ivaylo Korakov Date: Wed, 4 Nov 2020 08:49:37 +0100 Subject: [PATCH] Run it in the main thread instead --- redirectory/runnables/runnable_service.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/redirectory/runnables/runnable_service.py b/redirectory/runnables/runnable_service.py index 252f17a..317e553 100644 --- a/redirectory/runnables/runnable_service.py +++ b/redirectory/runnables/runnable_service.py @@ -1,5 +1,4 @@ from abc import ABC -from threading import Thread from flask import Flask, request, Response from kubi_ecs_logger import Logger, Severity @@ -93,9 +92,7 @@ def _run_production(self, is_worker: bool = False): if is_worker: # Start loading hyperscan database from management if it exists sync = Synchronizer() - - sync_thread = Thread(name="sync worker thread", target=sync.worker_sync_files) - sync_thread.start() + sync.worker_sync_files() service_options = { "bind": f"{self.host}:{self.port}",