Skip to content

Commit 645acb5

Browse files
committed
migrate paused inquiries
1 parent 84df1ab commit 645acb5

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

st2common/bin/migrations/v3.9/st2-migrate-liveaction-executiondb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ from st2common.service_setup import db_setup
4242
from st2common.service_setup import db_teardown
4343
from st2common.util import isotime
4444
from st2common.models.db.execution import ActionExecutionDB
45-
from st2common.constants.action import LIVEACTION_COMPLETED_STATES
45+
from st2common.constants.action import LIVEACTION_COMPLETED_STATES, LIVEACTION_STATUS_PAUSED
4646

4747
# NOTE: To avoid unnecessary mongoengine object churn when retrieving only object ids (aka to avoid
4848
# instantiating model class with a single field), we use raw pymongo value which is a dict with a
@@ -65,7 +65,7 @@ def migrate_executions(start_dt: datetime.datetime, end_dt: datetime.datetime) -
6565
res_count = ActionExecutionDB.objects(
6666
__raw__={
6767
"status": {
68-
"$in": LIVEACTION_COMPLETED_STATES,
68+
"$in": LIVEACTION_COMPLETED_STATES + [LIVEACTION_STATUS_PAUSED],
6969
},
7070
},
7171
start_timestamp__gte=start_dt,
@@ -79,7 +79,7 @@ def migrate_executions(start_dt: datetime.datetime, end_dt: datetime.datetime) -
7979
ActionExecutionDB.objects(
8080
__raw__={
8181
"status": {
82-
"$in": LIVEACTION_COMPLETED_STATES,
82+
"$in": LIVEACTION_COMPLETED_STATES + [LIVEACTION_STATUS_PAUSED],
8383
},
8484
},
8585
start_timestamp__gte=start_dt,

0 commit comments

Comments
 (0)