Skip to content

Commit

Permalink
adjust task limits
Browse files Browse the repository at this point in the history
Signed-off-by: Andrew Whitehead <[email protected]>
  • Loading branch information
andrewwhitehead committed Nov 18, 2019
1 parent 3737906 commit 422fe8b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
2 changes: 1 addition & 1 deletion aries_cloudagent/dispatcher.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ class Dispatcher:
def __init__(self, context: InjectionContext):
"""Initialize an instance of Dispatcher."""
self.context = context
self.task_queue = TaskQueue(max_active=50)
self.task_queue = TaskQueue(max_active=20)

def put_task(self, coro: Coroutine, complete: Callable = None) -> asyncio.Future:
"""Run a task in the task queue, potentially blocking other handlers."""
Expand Down
8 changes: 3 additions & 5 deletions aries_cloudagent/transport/outbound/manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ def __init__(self, context: InjectionContext):
self.registered_schemes = {}
self.registered_transports = {}
self.running_transports = {}
self.task_queue = TaskQueue(max_active=50)
self.task_queue = TaskQueue(max_active=100)
self._process_task: asyncio.Task = None

async def setup(self):
Expand Down Expand Up @@ -260,13 +260,11 @@ def enqueue_webhook(
retries: Override the number of retries
Raises:
OutboundDeliveryError: if the associated transport is not registered
OutboundDeliveryError: if the associated transport is not running
"""
transport_id = self.get_running_transport_for_endpoint(endpoint)
queued = QueuedOutboundMessage(
None, None, None, transport_id
)
queued = QueuedOutboundMessage(None, None, None, transport_id)
queued.endpoint = f"{endpoint}/topic/{topic}/"
queued.payload = json.dumps(payload)
queued.state = QueuedOutboundMessage.STATE_PENDING
Expand Down

0 comments on commit 422fe8b

Please sign in to comment.