-
-
Notifications
You must be signed in to change notification settings - Fork 4.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Updates to the models based on discussions throughout the week.
- Changed workflow_action to be action, and more generic. will use this to emit events on detectors or send notifications in workflows - Created lookup tables; detector_workflow and workflow_data_condition_group - Updated detector and workflow models to represent new design
- Loading branch information
1 parent
a80d29a
commit a53b0ef
Showing
5 changed files
with
36 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
from sentry.backup.scopes import RelocationScope | ||
from sentry.db.models import DefaultFieldsModel, FlexibleForeignKey, region_silo_model | ||
|
||
|
||
@region_silo_model | ||
class DetectorWorkflow(DefaultFieldsModel): | ||
__relocation_scope__ = RelocationScope.Organization | ||
|
||
detector = FlexibleForeignKey("workflow_engine.Detector") | ||
workflow = FlexibleForeignKey("workflow_engine.Workflow") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
10 changes: 10 additions & 0 deletions
10
src/sentry/workflow_engine/models/workflow_data_condition_group.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
from sentry.backup.scopes import RelocationScope | ||
from sentry.db.models import DefaultFieldsModel, FlexibleForeignKey, region_silo_model | ||
|
||
|
||
@region_silo_model | ||
class WorkflowDataConditionGroup(DefaultFieldsModel): | ||
__relocation_scope__ = RelocationScope.Organization | ||
|
||
workflow = FlexibleForeignKey("workflow_engine.Workflow") | ||
condition_group = FlexibleForeignKey("workflow_engine.WorkflowDataCondition", unique=True) |