Permalink
Browse files

Change datetime stamps to use UTC time

  • Loading branch information...
themartorana committed Apr 25, 2011
1 parent 438fd02 commit db3640be31d4da2d4127f7b8bf3a56f26a06ac11
Showing with 5 additions and 5 deletions.
  1. +3 −3 README.markdown
  2. +1 −1 django_ztask/management/commands/ztaskd.py
  3. +1 −1 django_ztask/models.py
View
@@ -3,10 +3,10 @@ IMPORTANT: READ ME
In version 0.1.4, we are introducing two major changes:
-1. Tasks now have a "created" datetime field. This was added to make sure `--replayfailed` replayed tasks in the appropriate order
+1. Tasks now have a `created` datetime field. This was added to make sure `--replayfailed` replayed tasks in the appropriate order
2. Introduced [South](http://south.aeracode.org/) migrations.
-IF YOU HAVE ALREADY INSTALLED django-ztask - you can "fake" the first migration, and then run the second migration:
+IF YOU HAVE ALREADY INSTALLED `django-ztask` - you can "fake" the first migration, and then run the second migration:
./manage.py migrate django_ztask --fake 0001
./manage.py migrate django_ztask
@@ -19,7 +19,7 @@ Installing
Download and install 0MQ version 2.1.3 or better from [http://www.zeromq.org](http://www.zeromq.org)
-Install pyzmq and django_ztaskd using PIP:
+Install pyzmq and django-ztask using PIP:
pip install pyzmq
pip install -e git+git@github.com:dmgctrl/django-ztask.git#egg=django_ztask
@@ -125,7 +125,7 @@ def _call_function(self, task_id, function_name=None, args=None, kwargs=None):
task.retry_count = task.retry_count - 1
task.next_attempt = time.time() + settings.ZTASKD_RETRY_AFTER
ioloop.DelayedCallback(lambda: self._call_function(task.pk), settings.ZTASKD_RETRY_AFTER * 1000, io_loop=self.io_loop).start()
- task.failed = datetime.datetime.now()
+ task.failed = datetime.datetime.utcnow()
task.last_exception = '%s' % e
task.save()
except Exception, e2:
View
@@ -29,7 +29,7 @@ class Task(Model):
def save(self, *args, **kwargs):
if not self.uuid:
- self.created = datetime.datetime.now()
+ self.created = datetime.datetime.utcnow()
self.uuid = uuid.uuid4()
super(Task, self).save(*args, **kwargs)

1 comment on commit db3640b

@MacMorgan

This comment has been minimized.

Show comment Hide comment
@MacMorgan

MacMorgan Apr 25, 2011

Owner

Thanks Dave! smooches

Owner

MacMorgan commented on db3640b Apr 25, 2011

Thanks Dave! smooches

Please sign in to comment.