Skip to content
This repository has been archived by the owner on Sep 16, 2020. It is now read-only.

How to pipe to more than one worker? #30

Open
ngw opened this issue Dec 8, 2016 · 0 comments
Open

How to pipe to more than one worker? #30

ngw opened this issue Dec 8, 2016 · 0 comments

Comments

@ngw
Copy link

ngw commented Dec 8, 2016

https://elixirforum.com/t/piping-toniq-jobs/2794/4

I'm trying to enqueue the same data structure to 2 different workers and it doesn't appear to work, apparently enqueue_to returns something different than what receives when everything works as expected.
I solved by using Enum.map, but I don't really like it:

Enum.map([Service.Macaw.CreationWorker, Service.Gannet.CreationWorker],
fn(worker) -> Toniq.enqueue(worker, service) end)

Is this how it's supposed to work?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant