fix
This commit is contained in:
parent
357ab5576f
commit
5c1418ddd8
@ -1,6 +1,6 @@
|
||||
from concurrent.futures import ThreadPoolExecutor
|
||||
import datetime
|
||||
import os
|
||||
from threading import Thread
|
||||
import zoneinfo
|
||||
import requests
|
||||
import time
|
||||
@ -13,6 +13,9 @@ else:
|
||||
QUEUES_URL = 'http://queues:1239'
|
||||
|
||||
|
||||
executor = ThreadPoolExecutor(max_workers=1)
|
||||
|
||||
|
||||
class QueuesException(Exception):
|
||||
...
|
||||
|
||||
@ -36,9 +39,7 @@ class TasksHandlerMixin:
|
||||
print(f'metric failed: {e}')
|
||||
|
||||
def send_metric(self, start, success, end):
|
||||
# Thread(target=self._send_metric, args=(start, success, end)).start()
|
||||
# self._send_metric(start, success, end)
|
||||
...
|
||||
executor.submit(self._send_metric, start, success, end)
|
||||
|
||||
def poll(self):
|
||||
while True:
|
||||
|
Loading…
Reference in New Issue
Block a user