Skip to content

Commit

Permalink
chore: named crontab parameter
Browse files Browse the repository at this point in the history
  • Loading branch information
Maxime Vergez committed May 22, 2023
1 parent 00079cc commit 198a731
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion backend/geonature/core/gn_commons/tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

@celery_app.on_after_finalize.connect
def setup_periodic_tasks(sender, **kwargs):
ct = config["MEDIAS_REFRESH_CRONTAB"]
ct = config["MEDIA_CLEAN_CRONTAB"]
if ct:
minute, hour, day_of_month, month_of_year, day_of_week = ct.split(" ")
sender.add_periodic_task(
Expand Down
2 changes: 1 addition & 1 deletion backend/geonature/utils/config_schema.py
Original file line number Diff line number Diff line change
Expand Up @@ -555,7 +555,7 @@ class GnGeneralSchemaConf(Schema):
HOME = fields.Nested(HomeConfig, load_default=HomeConfig().load({}))
NOTIFICATIONS_ENABLED = fields.Boolean(load_default=True)
PROFILES_REFRESH_CRONTAB = fields.String(load_default="0 3 * * *")
MEDIAS_REFRESH_CRONTAB = fields.String(load_default="0 1 * * *")
MEDIA_CLEAN_CRONTAB = fields.String(load_default="0 1 * * *")

@validates_schema
def validate_enable_sign_up(self, data, **kwargs):
Expand Down

0 comments on commit 198a731

Please sign in to comment.