Skip to content

Commit

Permalink
Drop concurrency (#4)
Browse files Browse the repository at this point in the history
  • Loading branch information
Wh1isper authored Jun 6, 2024
1 parent 1c2ab71 commit 925b512
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 5 deletions.
3 changes: 0 additions & 3 deletions brq/consumer.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,9 +58,6 @@ async def cleanup(self):
Cleanup, implement in subclass
"""

def copy(self):
return copy.deepcopy(self)


class Consumer(DeferOperator, RunnableMixin):
"""
Expand Down
4 changes: 2 additions & 2 deletions brq/daemon.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ class Daemon:
Tool for daemonizing a consumer.
"""

def __init__(self, runnable: RunnableMixin, concurrency: int = 1):
self.runnables = [runnable.copy() for _ in range(concurrency)]
def __init__(self, *runnables: list[RunnableMixin]):
self.runnables = runnables

async def run_forever(self, stop_signals: list = [signal.SIGINT, signal.SIGTERM]):
loop = asyncio.get_event_loop()
Expand Down

0 comments on commit 925b512

Please sign in to comment.