Skip to content

Conversation

@Kvadratni
Copy link
Contributor

  • Add running_tasks map to track abort handles for active jobs
  • Store abort handles when spawning job execution tasks
  • Implement actual task termination in kill_running_job method
  • Add comprehensive error handling for cancelled vs failed jobs
  • Update job execution to use tokio::spawn with stored abort handles
  • Ensure proper cleanup of abort handles after job completion
schedule_kill.mp4

Kvadratni added 5 commits May 29, 2025 16:23
- Add update_schedule method to scheduler backend
- Add PUT /schedule/{id} API endpoint for updating cron expressions
- Create EditScheduleModal component with cron validation and preview
- Add edit buttons to both schedule list and detail views
- Include toast notifications for successful/failed updates
- Prevent editing schedules while they are currently running
- Update OpenAPI schema and regenerate frontend API client
- Add individual loading states for pause/unpause and delete actions
- Buttons now disable immediately when clicked to prevent race conditions
- Edit button disabled during any other action on the same schedule
- Add loading text feedback (e.g., 'Pausing...', 'Unpausing...')
- Fix race condition where users could click Edit after Run Now
- Apply fix to both SchedulesView (list) and ScheduleDetailView (detail)
- Maintain proper button states across all schedule operations
- Add running_tasks map to track abort handles for active jobs
- Store abort handles when spawning job execution tasks
- Implement actual task termination in kill_running_job method
- Add comprehensive error handling for cancelled vs failed jobs
- Update job execution to use tokio::spawn with stored abort handles
- Ensure proper cleanup of abort handles after job completion
- Add running_tasks map to track abort handles for active jobs
- Store abort handles at scheduler level for both cron and run_now jobs
- Implement actual task termination in kill_running_job method
- Add comprehensive error handling for cancelled vs failed jobs
- Update job execution to use tokio::spawn with stored abort handles
- Ensure proper cleanup of abort handles after job completion
- Fix run_now jobs to be properly abortable with stored handles

Jobs can now be properly killed and will immediately stop execution
instead of continuing to run in the background.
@Kvadratni Kvadratni force-pushed the mnovich/improve-schduler branch from b744c08 to 407187c Compare May 29, 2025 23:23
@Kvadratni Kvadratni merged commit bd43086 into main May 30, 2025
7 checks passed
@Kvadratni Kvadratni deleted the mnovich/improve-schduler branch May 30, 2025 01:33
lifeizhou-ap added a commit to lifeizhou-ap/goose that referenced this pull request May 30, 2025
* upstream/main:
  fix: protobuf install in build (block#2714)
  feat: implement proper task cancellation for scheduled jobs (block#2731)
  docs: blog readme (block#2728)
GitMurf pushed a commit to GitMurf/goose that referenced this pull request May 30, 2025
cbruyndoncx pushed a commit to cbruyndoncx/goose that referenced this pull request Jul 20, 2025
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.

3 participants