Issues
GitHub issues are for bugs. If you have questions, please ask them on the mailing list.
Checklist
What OS are you using?
Linux Mint 21.2 Victoria
What version of Dramatiq are you using?
1.14.2
What did you do?
Retrieving results with get_results() from a group, where the group was declared with a specific broker, and it isn't using the global/default one.
I modified the groups and pipelines to looks for the result in the backend of the broker they were declared with, with this it works as expected. Here goes the PR with the proposed changes: #563
What did you expect would happen?
I expected that the group retrieved the result from the backend of the broker it was declared with.
What happened?
I get the following error: RuntimeError: The default broker doesn't have a results backend.
Minimal reproducible example
import dramatiq
from dramatiq.brokers.redis import RedisBroker
from dramatiq.results.backends import RedisBackend
from dramatiq.results import Results
@dramatiq.actor
def add(x, y):
return x + y
REDIS_URL = "redis://127.0.0.1:6379/0"
backend = RedisBackend(url=REDIS_URL)
results = Results(backend=backend, store_results=True)
broker = RedisBroker(url=REDIS_URL)
broker.add_middleware(results)
broker.declare_actor(add)
if __name__ == "__main__":
group = dramatiq.group(
broker=broker,
children=[
add.send(1, 1),
add.send(2, 2),
]
)
group.run()
results = list(group.get_results(block=True)) # RuntimeError!
print(results)
Issues
GitHub issues are for bugs. If you have questions, please ask them on the mailing list.
Checklist
What OS are you using?
Linux Mint 21.2 Victoria
What version of Dramatiq are you using?
1.14.2
What did you do?
Retrieving results with
get_results()from a group, where the group was declared with a specific broker, and it isn't using the global/default one.I modified the groups and pipelines to looks for the result in the backend of the broker they were declared with, with this it works as expected. Here goes the PR with the proposed changes: #563
What did you expect would happen?
I expected that the group retrieved the result from the backend of the broker it was declared with.
What happened?
I get the following error:
RuntimeError: The default broker doesn't have a results backend.Minimal reproducible example