Comments (2)
You should use GenStage.demand(producer, :accumulate)
or already start the producer with it set to accumulate so it doesn't emit events until the whole Flow pipeline is subscribed. Otherwise I am worried about silently ignoring "noproc" as it may hide other failures. Thanks for the report!
from flow.
Wonderful! 🎉 Setting that :accumulate
flag on GenStage.demand solved the problem. 👍 Thanks.
iex(4)> {:ok, producer} = GenStage.from_enumerable(1..3, link: false); GenStage.demand(producer, :accumulate); Flow.from_stages([producer], stages: 1) |> Flow.partition(stages: 3) |> Flow.map(fn i -> ms = :timer.seconds(i); IO.inspect("#{inspect(self)}: sleep #{i}"); Process.sleep(ms); ms end) |> Enum.to_list()
"#PID<0.1107.0>: sleep 2"
"#PID<0.1108.0>: sleep 1"
"#PID<0.1108.0>: sleep 3"
[2000, 1000, 3000]
from flow.
Related Issues (20)
- Flow outlives a Task that starts it HOT 1
- Unhelpful Error Message HOT 3
- Exceptions in Flow killing parent Oban process HOT 4
- Session windows are mentioned as supported but are not HOT 1
- Need help understanding back pressure HOT 1
- :no_proc errors when GenStage finishes quickly HOT 7
- Combining `Flow.shuffle/2` with `Flow.start_link/2` raises an error about unknown option `:dispatcher` HOT 4
- Access previous windows HOT 2
- Flow.from_specs and failed starts HOT 4
- Carve events into windows by count and timeout HOT 1
- Clarify :full_outer v :outer joins HOT 1
- GenServer.start/3 Dialyzer Issues in Flow.Coordinator HOT 2
- bypassing to next partition (eliminating passthrough traffic) HOT 4
- error logged, but works? HOT 4
- Spec Incorrect in Flow.into_specs/3 HOT 1
- from_stages - noproc errors when GenStage producer finishes early HOT 4
- segmentation fault HOT 6
- Possible Issue With Flow.through_specs/3 HOT 2
- Flow.map_batch/2 fails with CaseClauseError HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from flow.