Skip to content

Commit

Permalink
perf: rearrange some frequent jobs (#26591) (#26603)
Browse files Browse the repository at this point in the history
* perf: lower frequency of not so useful jobs

* fix: 4x deferred insert frequency

(cherry picked from commit 80a3bf3)

Co-authored-by: Ankush Menat <ankush@frappe.io>
  • Loading branch information
mergify[bot] and ankush committed May 30, 2024
1 parent 1b62208 commit d9b7d73
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions frappe/hooks.py
Original file line number Diff line number Diff line change
Expand Up @@ -194,11 +194,16 @@

scheduler_events = {
"cron": {
# 15 minutes
"0/15 * * * *": [
"frappe.oauth.delete_oauth2_data",
"frappe.website.doctype.web_page.web_page.check_publish_status",
"frappe.twofactor.delete_all_barcodes_for_users",
"frappe.email.doctype.email_account.email_account.notify_unreplied",
"frappe.utils.global_search.sync_global_search",
"frappe.deferred_insert.save_to_db",
],
# 10 minutes
"0/10 * * * *": [
"frappe.email.doctype.email_account.email_account.pull",
],
Expand All @@ -213,16 +218,13 @@
},
"all": [
"frappe.email.queue.flush",
"frappe.email.doctype.email_account.email_account.notify_unreplied",
"frappe.utils.global_search.sync_global_search",
"frappe.monitor.flush",
"frappe.automation.doctype.reminder.reminder.send_reminders",
],
"hourly": [
"frappe.model.utils.link_count.update_link_count",
"frappe.model.utils.user_settings.sync_user_settings",
"frappe.desk.page.backups.backups.delete_downloadable_backups",
"frappe.deferred_insert.save_to_db",
"frappe.desk.form.document_follow.send_hourly_updates",
"frappe.integrations.doctype.google_calendar.google_calendar.sync",
"frappe.email.doctype.newsletter.newsletter.send_scheduled_email",
Expand Down Expand Up @@ -546,4 +548,5 @@
"changelog-*", # version update notifications
"insert_queue_for_*", # Deferred Insert
"recorder-*", # Recorder
"global_search_queue",
]

0 comments on commit d9b7d73

Please sign in to comment.