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

Remove periodic task scheduling #1221

Merged
merged 1 commit into from
Jan 30, 2018
Merged
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
11 changes: 2 additions & 9 deletions onadata/apps/viewer/tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
from datetime import timedelta

from celery import task
from celery.task.schedules import crontab
from django.conf import settings
from django.shortcuts import get_object_or_404
from django.utils import timezone
Expand Down Expand Up @@ -355,10 +354,7 @@ def delete_export(export_id):
return False


@task.periodic_task(
run_every=(crontab(hour='*/7')),
ignore_result=True
)
@task(ignore_result=True)
def mark_expired_pending_exports_as_failed():
"""
Exports that have not completed within a set time should be marked as
Expand All @@ -371,10 +367,7 @@ def mark_expired_pending_exports_as_failed():
exports.update(internal_status=Export.FAILED)


@task.periodic_task(
run_every=(crontab(hour='*/7')),
ignore_result=True
)
@task(ignore_result=True)
def delete_expired_failed_exports():
"""
Delete old failed exports
Expand Down