fix(cron): avoid 30s timeout for cron run --expect-final (#29942)

* fix(cron): use longer default timeout for cron run --expect-final

* test(cron-cli): stabilize cron run timeout assertions with explicit run exits

---------

Co-authored-by: Kelly Baker <kelly@users.noreply.github.com>
Co-authored-by: Tak Hoffman <781889+Takhoffman@users.noreply.github.com>
This commit is contained in:
kleebaker
2026-03-02 08:24:42 -05:00
committed by GitHub
parent 254bb7ceee
commit b40d5817a2
2 changed files with 28 additions and 5 deletions

View File

@@ -93,8 +93,11 @@ export function registerCronSimpleCommands(cron: Command) {
.description("Run a cron job now (debug)")
.argument("<id>", "Job id")
.option("--due", "Run only when due (default behavior in older versions)", false)
.action(async (id, opts) => {
.action(async (id, opts, command) => {
try {
if (command.getOptionValueSource("timeout") === "default") {
opts.timeout = "600000";
}
const res = await callGatewayFromCli("cron.run", opts, {
id,
mode: opts.due ? "due" : "force",