-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathmodels.py
More file actions
22 lines (16 loc) · 881 Bytes
/
Copy pathmodels.py
File metadata and controls
22 lines (16 loc) · 881 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
"""Models for scheduled collector group run tracking."""
from django.db import models
class CollectorGroupRunStatus(models.Model):
"""Last run outcome per YAML schedule group (e.g. github, slack)."""
group_id = models.CharField(max_length=64, primary_key=True)
last_success_at = models.DateTimeField(null=True, blank=True)
last_failure_at = models.DateTimeField(null=True, blank=True)
last_run_at = models.DateTimeField(null=True, blank=True)
last_exit_code = models.IntegerField(null=True, blank=True)
updated_at = models.DateTimeField(auto_now=True)
class Meta:
db_table = "boost_collector_runner_collectorgrouprunstatus"
verbose_name = "Collector group run status"
verbose_name_plural = "Collector group run statuses"
def __str__(self) -> str:
return f"CollectorGroupRunStatus(group_id={self.group_id})"