activity: basic webhook alerts for automation failures
This commit is contained in:
parent
eb372bec59
commit
ac4f9b4942
12 changed files with 300 additions and 3 deletions
|
@ -38,6 +38,13 @@ class AbstractResource(db.Model):
|
|||
deprecation_reason = db.Column(db.String(), nullable=True)
|
||||
destroyed = db.Column(db.DateTime(), nullable=True)
|
||||
|
||||
def __init__(self, **kwargs):
|
||||
super().__init__(**kwargs)
|
||||
if self.added is None:
|
||||
self.added = datetime.utcnow()
|
||||
if self.updated is None:
|
||||
self.updated = datetime.utcnow()
|
||||
|
||||
def deprecate(self, *, reason: str):
|
||||
self.deprecated = datetime.utcnow()
|
||||
self.deprecation_reason = reason
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue