MCPcopy Create free account
hub / github.com/StackStorm/st2 / TimerDB

Class TimerDB

st2common/st2common/models/db/timer.py:23–42  ·  view source on GitHub ↗

Note: Right now timer is a meta model which is not persisted in the database (it's only used for RBAC purposes). Attribute: name: Timer name - maps to the URL path (e.g. st2/ or my/webhook/one).

Source from the content-addressed store, hash-verified

21
22
23class TimerDB(stormbase.StormFoundationDB, stormbase.UIDFieldMixin):
24 """
25 Note: Right now timer is a meta model which is not persisted in the database (it's only used
26 for RBAC purposes).
27
28 Attribute:
29 name: Timer name - maps to the URL path (e.g. st2/ or my/webhook/one).
30 """
31
32 RESOURCE_TYPE = ResourceType.TIMER
33 UID_FIELDS = ["pack", "name"]
34
35 name = me.StringField(required=True)
36 pack = me.StringField(required=True, unique_with="name")
37 type = me.StringField()
38 parameters = me.DictField()
39
40 def __init__(self, *args, **values):
41 super(TimerDB, self).__init__(*args, **values)
42 self.uid = self.get_uid()

Callers 1

get_oneMethod · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected