Skip to content

Commit

Permalink
fix: update import of tasks utils
Browse files Browse the repository at this point in the history
  • Loading branch information
vncsna committed Oct 9, 2023
1 parent bea530c commit 21be264
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
8 changes: 4 additions & 4 deletions basedosdados_api/api/v1/tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@
from huey.contrib.djhuey import periodic_task
from loguru import logger

from basedosdados_api.api.v1.admin import _update_table_metadata
from basedosdados_api.api.v1.admin import update_table_metadata


@periodic_task(crontab(minute="*/10"))
def every_ten_mins():
def every_ten_mins_task():
logger.info("Am I alive between these periods?")


@periodic_task(crontab(day_of_week="0", hour="0", minute="0"))
def update_table_metadata():
_update_table_metadata()
def update_table_metadata_task():
update_table_metadata()
3 changes: 1 addition & 2 deletions basedosdados_api/settings/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -413,8 +413,7 @@
"results": True,
"immediate": False,
"connection": {
# TODO: Delete this hotfix
"host": getenv("REDIS_URL", "localhost").replace("http://", ""),
"host": getenv("REDIS_URL", "localhost"),
"port": getenv("REDIS_PORT", 6379),
"db": getenv("REDIS_DB", 1),
"read_timeout": 1,
Expand Down

0 comments on commit 21be264

Please sign in to comment.