This commit is contained in:
Richard Kuo (Danswer)
2025-02-10 15:03:59 -08:00
parent 5e32f9d922
commit 5a4d007cf9

View File

@@ -172,10 +172,15 @@ def generate_cloud_tasks(
the cloud_beat_task_generator the cloud_beat_task_generator
beat_multiplier: a multiplier that can be applied on top of the task schedule beat_multiplier: a multiplier that can be applied on top of the task schedule
to speed up or slow down the task generation rate. useful in production. to speed up or slow down the task generation rate. useful in production.
Returns a list of cloud tasks, which consists of incoming tasks + tasks generated
from incoming templates.
""" """
# start with the incoming beat tasks
cloud_tasks: list[dict] = copy.deepcopy(beat_tasks) cloud_tasks: list[dict] = copy.deepcopy(beat_tasks)
# generate our cloud and self-hosted beat tasks from the templates # generate our cloud tasks from the templates
for beat_template in beat_templates: for beat_template in beat_templates:
cloud_task = make_cloud_generator_task(beat_template) cloud_task = make_cloud_generator_task(beat_template)
cloud_tasks.append(cloud_task) cloud_tasks.append(cloud_task)