@@ -42,7 +42,7 @@ from st2common.service_setup import db_setup
4242from st2common .service_setup import db_teardown
4343from st2common .util import isotime
4444from 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