Commit sur main · f8c7376 · @rmdes
A request without source_url syndicated one post, the oldest awaiting syndication, and stopped. The endpoint exists to be pinged after a deploy or on a schedule, so a backlog of several posts, which is what a deploy that publishes more than one post or an outage at a target leaves behind, needed as many pings as posts. Work through every post that still has a target to reach, oldest first and one at a time, recording each result on its post as before, and respond with a result per post. A target that fails is noted on its post and the batch carries on; an error updating a post stops the batch, and the posts not reached are still awaiting syndication for the next request. A request arriving while a batch is running is told so rather than syndicating the same posts again, since a deploy webhook and a scheduled request can coincide. Two tests sent the post URL as syndication.url, which the endpoint has never read (the form sends syndication.source_url, as the README documents). They passed because the fallback happened to pick the only post; they now send the documented parameter. The mock content store accepts more than one post so a test can seed a backlog.