Skip to content

Commit

Permalink
raise beat expiry ... 60 seconds might be starving certain tasks comp…
Browse files Browse the repository at this point in the history
…letely
  • Loading branch information
Richard Kuo (Danswer) committed Dec 23, 2024
1 parent 314901a commit bcca868
Showing 1 changed file with 10 additions and 8 deletions.
18 changes: 10 additions & 8 deletions backend/onyx/background/celery/tasks/beat_schedule.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
from onyx.configs.constants import OnyxCeleryPriority
from onyx.configs.constants import OnyxCeleryTask

BEAT_EXPIRES_DEFAULT = 30 * 60 # 30 minutes

# we set expires because it isn't necessary to queue up these tasks
# it's only important that they run relatively regularly
tasks_to_schedule = [
Expand All @@ -13,7 +15,7 @@
"schedule": timedelta(seconds=20),
"options": {
"priority": OnyxCeleryPriority.HIGH,
"expires": 60,
"expires": BEAT_EXPIRES_DEFAULT,
},
},
{
Expand All @@ -22,7 +24,7 @@
"schedule": timedelta(seconds=20),
"options": {
"priority": OnyxCeleryPriority.HIGH,
"expires": 60,
"expires": BEAT_EXPIRES_DEFAULT,
},
},
{
Expand All @@ -31,7 +33,7 @@
"schedule": timedelta(seconds=15),
"options": {
"priority": OnyxCeleryPriority.HIGH,
"expires": 60,
"expires": BEAT_EXPIRES_DEFAULT,
},
},
{
Expand All @@ -40,7 +42,7 @@
"schedule": timedelta(seconds=15),
"options": {
"priority": OnyxCeleryPriority.HIGH,
"expires": 60,
"expires": BEAT_EXPIRES_DEFAULT,
},
},
{
Expand All @@ -49,7 +51,7 @@
"schedule": timedelta(seconds=3600),
"options": {
"priority": OnyxCeleryPriority.LOWEST,
"expires": 60,
"expires": BEAT_EXPIRES_DEFAULT,
},
},
{
Expand All @@ -58,7 +60,7 @@
"schedule": timedelta(seconds=5),
"options": {
"priority": OnyxCeleryPriority.HIGH,
"expires": 60,
"expires": BEAT_EXPIRES_DEFAULT,
},
},
{
Expand All @@ -67,7 +69,7 @@
"schedule": timedelta(seconds=30),
"options": {
"priority": OnyxCeleryPriority.HIGH,
"expires": 60,
"expires": BEAT_EXPIRES_DEFAULT,
},
},
{
Expand All @@ -76,7 +78,7 @@
"schedule": timedelta(seconds=20),
"options": {
"priority": OnyxCeleryPriority.HIGH,
"expires": 60,
"expires": BEAT_EXPIRES_DEFAULT,
},
},
]
Expand Down

0 comments on commit bcca868

Please sign in to comment.