-
-
Notifications
You must be signed in to change notification settings - Fork 355
Closed
Labels
Milestone
Description
Hi!
Have you ever considered adding an EagerBroker?
My problem is that during test case execution, the join method will hang indefinitely if there is any exception in my code (and since I'm testing, most of the time there actually is one 😄 )
Also, the exceptions aren't bubbled up so I don't see them during the execution of the tests.
I wrote this very simple EagerBroker, but I'm wondering if you think this is good enough, or if there's any better way to handle this kind of situation.
Just in case, I'll leave this here as a reference if anyone googles this:
class EagerBroker(StubBroker):
def __init__(self):
super(EagerBroker, self).__init__()
def process_message(self, message):
actor = self.get_actor(message.actor_name)
actor(*message.args, **message.kwargs)
def enqueue(self, message, *, delay=None):
self.process_message(message)Reactions are currently unavailable