From 0776b440b522f2b01801c31e89b5cf4e8073f0f1 Mon Sep 17 00:00:00 2001 From: Dan McGee Date: Mon, 6 Sep 2010 12:37:52 -0500 Subject: Add new MirrorLog model and associated migration Signed-off-by: Dan McGee --- mirrors/models.py | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'mirrors/models.py') diff --git a/mirrors/models.py b/mirrors/models.py index 94256a9..5cab9db 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: -- cgit v1.2.3-24-g4f1b