Skip to content

Commit 8336672

Browse files
committed
rename enum
1 parent cc2ba06 commit 8336672

File tree

3 files changed

+7
-5
lines changed

3 files changed

+7
-5
lines changed

src/sentry/workflow_engine/models/detector.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
from sentry.issues import grouptype
1818
from sentry.issues.grouptype import GroupType
1919
from sentry.models.owner_base import OwnerModel
20-
from sentry.workflow_engine.types import DeletionStatus
20+
from sentry.workflow_engine.types import WorkflowEngineObjectStatus
2121

2222
from .json_config import JSONConfigBase
2323

@@ -44,7 +44,8 @@ class Detector(DefaultFieldsModel, OwnerModel, JSONConfigBase):
4444

4545
# The detector's status - used for tracking deletion state
4646
status = models.SmallIntegerField(
47-
default=DeletionStatus.ACTIVE.value, db_default=DeletionStatus.ACTIVE.value
47+
default=WorkflowEngineObjectStatus.ACTIVE.value,
48+
db_default=WorkflowEngineObjectStatus.ACTIVE.value,
4849
)
4950

5051
# Optionally set a description of the detector, this will be used in notifications

src/sentry/workflow_engine/models/workflow.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
from sentry.db.models.fields.hybrid_cloud_foreign_key import HybridCloudForeignKey
1212
from sentry.models.owner_base import OwnerModel
1313
from sentry.workflow_engine.models.data_condition import DataCondition, is_slow_condition
14-
from sentry.workflow_engine.types import DeletionStatus, WorkflowEventData
14+
from sentry.workflow_engine.types import WorkflowEngineObjectStatus, WorkflowEventData
1515

1616
from .json_config import JSONConfigBase
1717

@@ -32,7 +32,8 @@ class Workflow(DefaultFieldsModel, OwnerModel, JSONConfigBase):
3232

3333
# The workflow's status - used for tracking deletion state
3434
status = models.SmallIntegerField(
35-
default=DeletionStatus.ACTIVE.value, db_default=DeletionStatus.ACTIVE.value
35+
default=WorkflowEngineObjectStatus.ACTIVE.value,
36+
db_default=WorkflowEngineObjectStatus.ACTIVE.value,
3637
)
3738

3839
# Required as the 'when' condition for the workflow, this evalutes states emitted from the detectors

src/sentry/workflow_engine/types.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ class DetectorSettings:
144144
config_schema: dict[str, Any] = field(default_factory=dict)
145145

146146

147-
class DeletionStatus(IntEnum):
147+
class WorkflowEngineObjectStatus(IntEnum):
148148
ACTIVE = 0
149149
PENDING_DELETION = 1
150150
DELETION_IN_PROGRESS = 2

0 commit comments

Comments
 (0)