Skip to content

update timeutils usage to work with celery 4 #524

New issue

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

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

Already on GitHub? # to your account

Merged
merged 1 commit into from
Jul 17, 2017
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
1 change: 1 addition & 0 deletions djcelery/backends/database.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

from celery import current_app
from celery.backends.base import BaseDictBackend

try:
from celery.utils.timeutils import maybe_timedelta
except ImportError:
Expand Down
6 changes: 5 additions & 1 deletion djcelery/schedulers.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,11 @@
from celery.beat import Scheduler, ScheduleEntry
from celery.utils.encoding import safe_str, safe_repr
from celery.utils.log import get_logger
from celery.utils.timeutils import is_naive

try:
from celery.utils.timeutils import is_naive
except ImportError:
from celery.utils.time import is_naive

from django.db import transaction
from django.core.exceptions import ObjectDoesNotExist
Expand Down
6 changes: 5 additions & 1 deletion djcelery/snapshot.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,11 @@
from celery.events.snapshot import Polaroid
from celery.five import monotonic
from celery.utils.log import get_logger
from celery.utils.timeutils import maybe_iso8601

try:
from celery.utils.timeutils import maybe_iso8601
except ImportError:
from celery.utils.time import maybe_iso8601

from .models import WorkerState, TaskState
from .utils import fromtimestamp, correct_awareness
Expand Down