mirror of
https://github.com/django-q2/django-q2.git
synced 2026-10-05 09:18:12 +08:00
Lots of stuff
- changed to single monitor for success and failures - result is now in django model - started addings tests
This commit is contained in:
@@ -7,9 +7,13 @@ class Task(models.Model):
|
||||
name = models.CharField(max_length=100)
|
||||
func = models.CharField(max_length=256)
|
||||
task = models.TextField(null=True)
|
||||
result = models.TextField(null=True)
|
||||
started = models.DateTimeField()
|
||||
stopped = models.DateTimeField()
|
||||
success = models.BooleanField(default=True)
|
||||
|
||||
def time_taken(self):
|
||||
return (self.stopped - self.started).total_seconds()
|
||||
|
||||
class Meta:
|
||||
app_label = 'django_q'
|
||||
|
||||
Reference in New Issue
Block a user