mirror of
https://github.com/moltbot/moltbot.git
synced 2026-04-25 23:47:20 +00:00
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:
@@ -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",
|
||||
|
||||
Reference in New Issue
Block a user