Save multiple output when iteration stops in PostOffice
#852
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What is the problem / what does the code in this PR do
When testing
SingleThreadProcessor
, run the codes below:In
strax_test_data/012882-pulse_counts-exzzquvjyt_temp
, runls -lah
,So no chunk is saved. This is because after a
topic
stops its iteration and if it is from a multiple output plugin likePulseProcessing
, other provideddata_types
are not saved:strax/strax/processors/post_office.py
Line 244 in 40f85a3
Can you briefly describe how it works?
I made
PostOffice._multi_output_topics
a dictionary. The keys of it are the topics, and the values of it are all the provides of the plugin which provides thetopic
. Whenever aStopIteration
is encounteredPostOffice._fetch_new
, all messages(outputs) will be sent toPostOffice._ack_topic_exhausted
.Can you give a minimal working example (or illustrate with a figure)?
As the codes above shown, after this PR, in
strax_test_data/012882-pulse_counts-exzzquvjyt
, runls -lah
,Please include the following if applicable:
Please make sure that all automated tests have passed before asking for a review (you can save the PR as a draft otherwise).