swarm: a script can name its own queue with a tag - #304
Merged
Merged
Conversation
The queue lives under .swarm in the working directory, one per
directory, shared by every swarm script run there. A fetcher that dies
on a day leaves it in died/, and the next swarm script to run with no
arguments replays it as one of its own tasks — the wrong script.
`swarm { tag: 'reports' }`, or `-t reports` on the command line, keeps
the queue under .swarm/reports/ instead. No tag is the shared .swarm/,
as before. -r removes only the named queue and says which; a tag that
is not a plain name is refused. Tests cover the option, the flag,
isolation between two tagged scripts in one directory, reset, and the
refusal.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
The queue lives under
.swarmin the working directory, one per directory, shared by every swarm script run there. A fetcher that dies on a day leaves it indied/, and the next swarm script to run with no arguments replays it as one of its own tasks — the wrong script. Found wiring medlabs' two Labcorp fetchers, which run back to back from one directory.swarm { tag: 'reports' }, or-t reportson the command line, keeps the queue under.swarm/reports/instead. No tag is the shared.swarm/, exactly as before.-rremoves only the named queue and says which; a tag that is not a plain name is refused.Four new tests: the option, the flag, isolation between two tagged scripts in one directory, reset, and the refusal. Suite 33/33. README carries the option, the flag, and one paragraph on why.