Skip to content

Commit 140be90

Browse files
author
stlc-bot
committed
feat(batch): accept lightweight submissions and queue pending work (#2683)
Stainless-Generated-From: 1945e81b700fd8a7fc7bdfcd537dfab03de3e5c8
1 parent 7921b3d commit 140be90

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

‎pkg/cmd/batch.go‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ var batchGetResults = cli.Command{
138138

139139
var batchSubmit = requestflag.WithInnerFlags(cli.Command{
140140
Name: "submit",
141-
Usage: "Scrape up to 100,000 URLs, or crawl a site, asynchronously using the same\nformats and scrape parameters as POST /web/scrape. Choose Markdown, HTML,\nscreenshots, images, bytes, parsed fields, products, highlights, and JSON. Poll\nthe batch ID or receive a webhook when it finishes.",
141+
Usage: "Scrape up to 100,000 URLs, or crawl a site, asynchronously using the same\nformats and scrape parameters as POST /web/scrape. Choose Markdown, HTML,\nscreenshots, images, bytes, parsed fields, products, highlights, and JSON.\nSubmission persists the input and returns immediately with status pending.\nOrganizations with fewer than 10 available credits and no overage are rejected\nwith 402 up front. Each organization can submit up to 1,000 batches per minute,\nindependently of its polling budget. Batches wait pending when execution\ncapacity is full. Validation, sitemap discovery, the full credit quote, and\nshard scheduling happen afterward. Poll the batch ID or receive a webhook when\nit finishes. Deferred rejections appear as status failed with a failure code and\nmessage.",
142142
Suggest: true,
143143
Flags: []cli.Flag{
144144
&requestflag.Flag[map[string]any]{

‎pkg/cmd/batch_test.go‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ func TestBatchList(t *testing.T) {
3333
"--q", "batch_1a2b",
3434
"--search-type", "exact",
3535
"--should-include-unified=true",
36-
"--status", "queued",
36+
"--status", "pending",
3737
"--tags", "docs,competitor",
3838
)
3939
})

0 commit comments

Comments
 (0)