Skip to content

Commit 4365a43

Browse files
Merge pull request #10 from milind-shakya-sp/debug_restart_issue
Debug restart issue
2 parents 4dd3826 + 01b3b52 commit 4365a43

File tree

2 files changed

+11
-2
lines changed

2 files changed

+11
-2
lines changed

django_celery_beat/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
from collections import namedtuple
1212

13-
__version__ = '1.4.0+singleplatform.1'
13+
__version__ = '1.4.0+singleplatform.2'
1414
__author__ = 'Ask Solem'
1515
__contact__ = '[email protected]'
1616
__homepage__ = 'https://github.com/celery/django-celery-beat'

django_celery_beat/models.py

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,15 @@ def maybe_make_aware(self, dt):
117117
return dt
118118

119119

120+
class TZNaiveCronSchedule(schedules.crontab):
121+
122+
def maybe_make_aware(self, dt):
123+
"""
124+
Overriding the base method, to be a no-op and returning the dt as is.
125+
"""
126+
return dt
127+
128+
120129
@python_2_unicode_compatible
121130
class IntervalSchedule(models.Model):
122131
"""Schedule executing every n seconds."""
@@ -225,7 +234,7 @@ def __str__(self):
225234

226235
@property
227236
def schedule(self):
228-
crontab = schedules.crontab(
237+
crontab = TZNaiveCronSchedule(
229238
minute=self.minute,
230239
hour=self.hour,
231240
day_of_week=self.day_of_week,

0 commit comments

Comments
 (0)