Skip to content

swarm: a script can name its own queue with a tag - #304

Merged
shreeve merged 1 commit into
mainfrom
swarm/tagged-queues
Sep 12, 2026
Merged

shreeve merged 1 commit into
mainfrom
swarm/tagged-queues

Conversation

@shreeve

@shreeve shreeve commented Sep 12, 2026

Copy link
Copy Markdown
Owner

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. Found wiring medlabs' two Labcorp fetchers, which run back to back from one directory.

swarm { tag: 'reports' }, or -t reports on the command line, keeps the queue under .swarm/reports/ instead. No tag is the shared .swarm/, exactly as before. -r removes 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.

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.
@shreeve
shreeve merged commit 5b9c48e into main Sep 12, 2026
2 checks passed
@shreeve
shreeve deleted the swarm/tagged-queues branch September 12, 2026 02:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant