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

Check to make sure that when Celery completes a task, that task and its associated data is removed from Redis immediately #1487

Closed
4 tasks
ccostino opened this issue Dec 16, 2024 · 0 comments · Fixed by #1492
Assignees
Labels
engineering python Pull requests that update Python code

Comments

@ccostino
Copy link
Contributor

When we discovered that none of the Redis keys were expiring, we started adding expiration dates to the things that need them (and have more to do). That said, it seems there is a lot that is still sitting in Redis that has no need to be once a task is completed by Celery. The task information and any associated data should be cleared out automatically once a task is finished in Celery, but that does not appear to be happening. There's no need to hold on to stuff and wait for it to expire if it's been fully taken care of.

Let's double check that this is indeed the case and make any adjustments necessary if it's not.

Implementation Sketch and Acceptance Criteria

  • Read over Celery's Task docs (and any other relevant documentation) to make sure we have a clear understanding of what should happen when a task completes and if we need to explicitly tell it to clear things out of the queue when done
  • Make any necessary adjustments to our Celery configuration; note that we have multiple queues to be mindful of!
  • Adjust tests as necessary
  • Test locally and in staging by getting some tasks to fire off and monitor that they actually go in and out of Redis as expected once completed

Security Considerations

  • We should not be holding on to stale data in our Redis cluster when it's not necessary.
@ccostino ccostino added engineering python Pull requests that update Python code labels Dec 16, 2024
@ccostino ccostino moved this from 🌱 New to ⬇ Up-Next in Notify.gov product board Dec 16, 2024
@terrazoon terrazoon self-assigned this Dec 18, 2024
@terrazoon terrazoon moved this from ⬇ Up-Next to 🏗 In progress (WIP: ≤ 3 per person) in Notify.gov product board Dec 18, 2024
@terrazoon terrazoon linked a pull request Dec 18, 2024 that will close this issue
@terrazoon terrazoon moved this from 🏗 In progress (WIP: ≤ 3 per person) to 👀 In review in Notify.gov product board Dec 19, 2024
@github-project-automation github-project-automation bot moved this from 👀 In review to ✅ Done in Notify.gov product board Dec 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
engineering python Pull requests that update Python code
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

2 participants