diff options
author | Dan McGee <dan@archlinux.org> | 2010-09-06 12:37:52 -0500 |
---|---|---|
committer | Dan McGee <dan@archlinux.org> | 2010-09-21 09:10:33 -0500 |
commit | 0776b440b522f2b01801c31e89b5cf4e8073f0f1 (patch) | |
tree | 59ab7e52e1f69e510dc9947accce599264033a2e /mirrors/models.py | |
parent | 1b6cf5261c2a87c507fef290bf9d2af5606c8451 (diff) |
Add new MirrorLog model and associated migration
Signed-off-by: Dan McGee <dan@archlinux.org>
Diffstat (limited to 'mirrors/models.py')
-rw-r--r-- | mirrors/models.py | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/mirrors/models.py b/mirrors/models.py index 94256a9c..5cab9db6 100644 --- a/mirrors/models.py +++ b/mirrors/models.py @@ -54,4 +54,18 @@ class MirrorRsync(models.Model): class Meta: verbose_name = 'Mirror Rsync IP' +class MirrorLog(models.Model): + url = models.ForeignKey(MirrorUrl, related_name="logs") + check_time = models.DateTimeField(db_index=True) + last_sync = models.DateTimeField(null=True) + duration = models.FloatField(null=True) + is_success = models.BooleanField(default=True) + error = models.CharField(max_length=255, blank=True, default='') + + def __unicode__(self): + return "Check of %s at %s" % (url.url, check_time) + + class Meta: + verbose_name = 'Mirror Check Log' + # vim: set ts=4 sw=4 et: |