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

Improvements to Delete Endpoint and Statuses #174

Open
wants to merge 19 commits into
base: master
Choose a base branch
from

Conversation

haroldrubio
Copy link
Member

Resolves

This PR contains the following changes:

  • Switches the /delete endpoint to POST
  • Adds a new status Revoked to the JobConfig
  • Fixes a bug where jobs that were waiting to have their scores computed were displayed as running, now they are shown as queued for expertise
  • Adds the JobConfig as a dict to the Celery task arguments so the job information is visible when querying the queue by the Celery CLI
  • Changes the logic of the /delete endpoint:
    • If called on a running job (any job whose status is not error or completed), sets the status to revoked, the job maintains the revoked status and gets cleaned up after making a final check in the expertise Celery task
    • If called on a non-running jobs (either error or completed), cleans the files on disk and removes the job from Redis
  • Changes the high load test (which queues 5 jobs) to revoke the last job and checks that it was cleaned up correctly

@haroldrubio haroldrubio self-assigned this Feb 14, 2024
@melisabok
Copy link
Member

the changes look good!

I'm wondering if this PR is still active: #137

I think the jobs that were running and the server is restarted should be change to status "revoked", right?

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.

2 participants