Skip to content

feat: scheduled job management — run now and postpone#40

Merged
eclectic-coding merged 3 commits into
mainfrom
feat/scheduled-job-management
May 21, 2026
Merged

feat: scheduled job management — run now and postpone#40
eclectic-coding merged 3 commits into
mainfrom
feat/scheduled-job-management

Conversation

@eclectic-coding
Copy link
Copy Markdown
Owner

Summary

  • Adds ScheduledJobsController#update (PATCH /scheduled_jobs/:id) with four offset options: now, 1h, 24h, 7d
  • offset=now back-dates scheduled_at to 1 second ago so the Solid Queue dispatcher picks the job up on its next tick
  • offset=1h/24h/7d pushes scheduled_at forward by the chosen duration on both the ScheduledExecution record and the underlying Job
  • Turbo Stream responses: row is removed on "Run Now"; scheduled_at cell is updated in place on postpone
  • "Run Now" / "+1h" / "+24h" / "+7d" buttons appear in the scheduled-status row alongside the existing Discard button
  • 11 request spec examples, 100% coverage maintained

Test plan

  • bundle exec rspec spec/requests/solid_queue_web/scheduled_jobs_spec.rb — all 11 examples pass
  • bundle exec rspec — full suite green, 100% coverage
  • bundle exec rake — audit + rubocop + spec all pass
  • Visit /jobs/list?status=scheduled, confirm Run Now / +1h / +24h / +7d buttons appear only on the Scheduled tab
  • Click "Run Now" — row disappears via Turbo Stream; job is dispatched on next dispatcher tick
  • Click "+1h" — scheduled_at cell updates in place with the new time

🤖 Generated with Claude Code

eclectic-coding and others added 3 commits May 21, 2026 07:54
Adds ScheduledJobsController#update with PATCH /scheduled_jobs/:id.
offset=now back-dates scheduled_at so the dispatcher picks the job up
immediately; offset=1h/24h/7d pushes scheduled_at forward on both the
execution and the job record. Turbo Stream removes the row on run-now
and updates the scheduled_at cell in place on postpone. Run Now / +1h /
+24h / +7d buttons appear in the scheduled-status row actions alongside
the existing Discard button.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@eclectic-coding eclectic-coding merged commit abe73a3 into main May 21, 2026
7 checks passed
@eclectic-coding eclectic-coding deleted the feat/scheduled-job-management branch May 21, 2026 12:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant