mirror of
https://github.com/TandoorRecipes/recipes.git
synced 2026-01-10 08:38:34 -05:00
disable connector in tests
This commit is contained in:
@@ -2,7 +2,6 @@ import asyncio
|
||||
import logging
|
||||
import multiprocessing
|
||||
import queue
|
||||
import weakref
|
||||
from asyncio import Task
|
||||
from dataclasses import dataclass
|
||||
from enum import Enum
|
||||
@@ -50,7 +49,6 @@ class ConnectorManager:
|
||||
self._queue = multiprocessing.JoinableQueue(maxsize=settings.EXTERNAL_CONNECTORS_QUEUE_SIZE)
|
||||
self._worker = multiprocessing.Process(target=self.worker, args=(0, self._queue,), daemon=True)
|
||||
self._worker.start()
|
||||
self._finalizer = weakref.finalize(self, self.stop)
|
||||
|
||||
# Called by post save & post delete signals
|
||||
def __call__(self, instance: Any, **kwargs) -> None:
|
||||
@@ -138,6 +136,9 @@ class ConnectorManager:
|
||||
|
||||
logging.info(f"terminating ConnectionManager worker {worker_id}")
|
||||
|
||||
asyncio.set_event_loop(None)
|
||||
loop.close()
|
||||
|
||||
@staticmethod
|
||||
def get_connected_for_config(config: ConnectorConfig) -> Optional[Connector]:
|
||||
match config.type:
|
||||
|
||||
Reference in New Issue
Block a user