Skip to content

Commit

Permalink
clean pr
Browse files Browse the repository at this point in the history
  • Loading branch information
kevgliss committed Sep 13, 2023
1 parent 14f2a56 commit cc8dfa6
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/dispatch/signal/flows.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,10 @@ def signal_instance_create_flow(
)
return signal_instance

# limited support for canary signals, just store the instance and return
if signal_instance.canary:
return signal_instance

if not signal_instance.signal.create_case:
return signal_instance

Expand Down
2 changes: 2 additions & 0 deletions src/dispatch/signal/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -231,6 +231,7 @@ class SignalInstance(Base, TimeStampMixin, ProjectMixin):
case_priority = relationship("CasePriority", backref="signal_instances")
fingerprint = Column(String)
filter_action = Column(String)
canary = Column(Boolean, default=False)
raw = Column(JSONB)
signal = relationship("Signal", backref="instances")
signal_id = Column(Integer, ForeignKey("signal.id"))
Expand Down Expand Up @@ -364,6 +365,7 @@ class AdditionalMetadata(DispatchBase):
class SignalInstanceBase(DispatchBase):
project: ProjectRead
case: Optional[CaseReadMinimal]
canary: Optional[bool] = False
entities: Optional[List[EntityRead]] = []
raw: dict[str, Any]
filter_action: SignalFilterAction = None
Expand Down

0 comments on commit cc8dfa6

Please sign in to comment.