Weekly series drop: on_active_run reject stops a second render
Set on_active_run to reject and a second episode run on the same Format answers 409 format_run_in_progress instead of starting. skip records a skipped run.

Send on_active_run: "reject" on the create call and Sume will answer 409 format_run_in_progress when a run of that Format is already in flight, instead of starting a second one. For a weekly series that is the guard you want: if the Friday job fires twice, or someone clicks run while episode 9 is still rendering, the second request fails fast and costs nothing. The default is allow, which runs both at once.
The three values
| Value | What happens when a run is already in flight |
|---|---|
allow (default) | The new run starts concurrently; workspace generation concurrency still applies |
skip | Sume records a run with status skipped |
reject | The request answers 409 format_run_in_progress and no run is created |
Which one for a series
Use reject for a human or script that decides to make an episode: you want to know it did not start. Use skip for an unattended schedule where a missed week is acceptable, and read the docs note that Scheduled Actions default to skip, so do not copy their bodies into API calls. Keep allow for anything that is meant to overlap, such as separate series on separate Formats.
This guard is per Format. If your season runs several Formats, one for the script, one for the video, each has its own in-flight check.
A weekly series is the textbook case for a guard because the cost of a double fire is a second full episode of generation. The check happens at create time, so a rejected call has no run and no spend, and your script can log the 409 and exit. If instead the previous episode is stuck, look at that run's status first; do not loop on the rejection.
The call
This request asks for episode 9 and refuses to overlap. Replace the handle and slug with your Format's address, and give the episode number its own Idempotency-Key so a retry returns the original run instead of a new one.
curl -sS -X POST "https://api.sume.com/v1/formats/YOUR_HANDLE/YOUR_SLUG/runs" \
-H "Authorization: Bearer $SUME_API_KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: season-1-episode-9-v1" \
-d '{
"instruction": "Render episode 9 from the season outline.",
"input": { "season": 1, "episode": 9 },
"on_active_run": "reject"
}'Two things it does not do
First, reject and the idempotency key answer different questions. The key says 'this exact request already happened', and a replay returns the original run with idempotency_hit: true. The guard says 'another run of this Format is happening now'. Use both.
Second, a bulk queue ignores the field on its items: every child runs with allow so that the window can fill. If you want episodes to be strictly one at a time, set the queue's concurrency to 1 rather than putting reject on each item.
Cancel is the other half of the story: if an old run really is stuck, POST /v1/format-runs/{id}/cancel stops it, after which a new run is accepted. Read the run's cancelable flag before calling it.
Sources
Related posts
More in Formats
- Which Sume catalog Formats make ad creative: the slugs by ad type
Sume ships 27 ready-made Formats at the sume handle. Which slugs fit which ad type, and how to read one with GET /v1/formats/sume/{slug} before paying.
- 100 bulk items: 7 rounds at concurrency 16, 25 rounds at concurrency 4
A Format bulk queue holds up to 100 items and runs 1 to 16 at once. If items take equal time, 100 items need ceil(100/16) = 7 rounds at 16 and 25 rounds at 4.
- 200 product videos in Sume: two queues of 100, 6 to 12 hours
Bulk-run 200 product videos: two queues of 100 items, 8 runs in flight, 25 rounds. At 15 to 30 minutes a run that is about 6.25 to 12.5 hours.
- A 340-product catalog: four Sume bulk queues of 100, 100, 100 and 40
A bulk queue holds 1 to 100 items, so 340 product videos need four queues. Split the list, key each queue, and remember workspace concurrency still applies.
Written by Sume