Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Functionality to Stop a Running Job on the Harvest Job Page #4897

Open
Jin-Sun-tts opened this issue Sep 19, 2024 · 0 comments
Open

Add Functionality to Stop a Running Job on the Harvest Job Page #4897

Jin-Sun-tts opened this issue Sep 19, 2024 · 0 comments
Labels
H2.0/Harvest-Flask Front-end webapp & APIs

Comments

@Jin-Sun-tts
Copy link
Contributor

User Story

Implement a feature on the Harvest Job Page that allows users to stop a running job. Upon cancelling, the backend should handle job cancellation by updating the job's status in the HarvestDB job table and associated error table, marking the job as 'error'.

Acceptance Criteria

Frontend:

  • Add a "Stop Job" button to the Harvest Job Page.
  • The button should be disabled for completed or already stopped jobs.
  • A confirmation modal should appear when the "Stop Job" button is clicked, asking the user to confirm the cancellation.

Backend:

  • On job cancellation, update the job's status in the harvest_job table to "error".
  • Update any relevant entries in the job_error table.
  • Ensure that any running processes tied to the job are properly terminated.
  • Return appropriate success or error responses to the frontend.

Testing:

  • Write unit and integration tests to verify that stopping a job updates both the job and error tables.
  • Ensure edge cases are tested (e.g., stopping already completed jobs, handling database errors).
@Jin-Sun-tts Jin-Sun-tts added the H2.0/Harvest-Flask Front-end webapp & APIs label Sep 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
H2.0/Harvest-Flask Front-end webapp & APIs
Projects
Status: H2.0 Backlog
Development

No branches or pull requests

1 participant