Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: update import of tasks utils #435

Merged
merged 1 commit into from
Oct 9, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading