Skip to content

Commit 6349139

Browse files
committed
Fixed info about time run. Added MANIFEST.in
1 parent 836b499 commit 6349139

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

MANIFEST.in

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
include AUTHORS
2+
include LICENSE
3+
include MANIFEST.in
4+
include README.rst

django_cron/__init__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ def __should_run_now(self, cron_job, force=False):
4141
Returns a boolean determining whether this cron should run now or not!
4242
"""
4343
# If we pass --force options, we force cron run
44+
self.user_time = None
4445
if force:
4546
return True
4647
if cron_job.schedule.run_every_mins != None:
@@ -83,7 +84,6 @@ def run(self, cron_job, force=False):
8384
except Exception:
8485
cron_log.is_success = False
8586
cron_log.message = traceback.format_exc()[-1000:]
86-
if self.user_time:
87-
cron_log.ran_at_time = self.user_time
87+
cron_log.ran_at_time = self.user_time if self.user_time else None
8888
cron_log.end_time = timezone.now()
8989
cron_log.save()

0 commit comments

Comments
 (0)