-
Notifications
You must be signed in to change notification settings - Fork 1
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
✨(mailbox_manager) add shedule task to fetch domains status #662
base: main
Are you sure you want to change the base?
Conversation
248536a
to
ecf65c0
Compare
4170d68
to
5bfccf9
Compare
099f029
to
b74aa7a
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Did you consider adding the sentry for celery? https://docs.sentry.io/platforms/python/integrations/celery/
f0081d2
to
4b3bb9f
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When trying this locally, a file src/backend/celerybeat-schedule
is created - it would be good to add it to .gitignore
?
src/backend/mailbox_manager/tasks.py
Outdated
else: | ||
check_count += 1 | ||
# todo: add more details to store more information in the database | ||
return f"Domains processed: {update_count} updated, {check_count} checked" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The counting logic is counter-intuitive. A domain is counted as either checked or updated (so you can have 1 updated and 0 checked). What I would expect is that "updated" is a subset of "checked"…
Also, domains that failed verification are not counted at all… and we probably want to report them because the failure logs are going to be hidden in the Celery container's logs, not directly visible here.
I would prefer something like
f"Domains processed: {same_count} not changed, {update_count} updated, {failure_count} failed, {check_count} checked"
with the invariant same_count+update_count+failure_count == check_count.
Add new container to run celery beat to manage schedule job
4b3bb9f
to
736595b
Compare
Add celery crontab to check and update domains status. This task calls dimail API.
Allow to manage and monitor celery tasks
This allow to start a celery worker and a celery beat
736595b
to
c229a8a
Compare
Add celery crontab to check and update domains status. This task calls dimail API.
TODO: