Module Import alias ImportFrom alias Import alias ImportFrom alias identifier ImportFrom alias ImportFrom alias identifier ImportFrom alias ImportFrom alias ImportFrom alias identifier ImportFrom alias ImportFrom alias Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assign NameStore Dict Str Str ListLoad Str ListLoad Str ClassDef bases NameLoad body FunctionDef arguments args NameParam defaults body Expr Call AttributeLoad NameLoad attr Expr Call AttributeLoad Call NameLoad NameLoad NameLoad attr decorator_list NameLoad FunctionDef arguments args NameParam defaults body Expr Call AttributeLoad Call NameLoad NameLoad NameLoad attr Assign NameStore Call NameLoad Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr keyword Str keyword NameLoad decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore Call AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr SubscriptLoad SubscriptLoad AttributeLoad NameLoad attr Index Str Index Str Assign SubscriptStore NameLoad Index Str BinOpSub NameLoad Call NameLoad keyword Num Assign SubscriptStore NameLoad Index Str BinOpSub NameLoad Call NameLoad keyword Num Assign SubscriptStore NameLoad Index Str AttributeLoad NameLoad attr Assign SubscriptStore NameLoad Index Str Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr NameLoad Assign NameStore Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Call NameLoad NameLoad Num Assign NameStore Str Expr Call AttributeLoad NameLoad attr NameLoad NameLoad NameLoad keyword NameLoad keyword NameLoad Assign NameStore Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Call NameLoad NameLoad Num decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore Call AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr SubscriptLoad SubscriptLoad AttributeLoad NameLoad attr Index Str Index Str Assign SubscriptStore NameLoad Index Str BinOpSub NameLoad Call NameLoad keyword Num Assign SubscriptStore NameLoad Index Str BinOpSub NameLoad Call NameLoad keyword Num Assign SubscriptStore NameLoad Index Str AttributeLoad NameLoad attr Assign SubscriptStore NameLoad Index Str Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr NameLoad Assign NameStore Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Call NameLoad NameLoad Num Expr Call NameLoad keyword NameLoad keyword Str keyword BinOpSub NameLoad Call NameLoad keyword Num Assign NameStore Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Call NameLoad NameLoad Num Expr Call NameLoad keyword NameLoad keyword Str keyword BinOpSub NameLoad Call NameLoad keyword Num Assign NameStore Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Call NameLoad NameLoad Num decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore Call AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr SubscriptLoad SubscriptLoad AttributeLoad NameLoad attr Index Str Index Str Assign SubscriptStore NameLoad Index Str BinOpSub NameLoad Call NameLoad keyword Num Assign SubscriptStore NameLoad Index Str BinOpSub NameLoad Call NameLoad keyword Num Assign SubscriptStore NameLoad Index Str AttributeLoad NameLoad attr Assign SubscriptStore NameLoad Index Str Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr NameLoad Assign NameStore Call AttributeLoad NameLoad attr SubscriptLoad SubscriptLoad AttributeLoad NameLoad attr Index Str Index Str Assign SubscriptStore NameLoad Index Str BinOpSub NameLoad Call NameLoad keyword Num Assign SubscriptStore NameLoad Index Str BinOpSub NameLoad Call NameLoad keyword Num Assign SubscriptStore NameLoad Index Str AttributeLoad NameLoad attr Assign SubscriptStore NameLoad Index Str Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr NameLoad Assign NameStore Call AttributeLoad NameLoad attr Expr Call NameLoad keyword NameLoad keyword BinOpSub NameLoad Call NameLoad keyword Num Assign NameStore Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Call NameLoad NameLoad Num decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore Call AttributeLoad NameLoad attr Assign NameStore BinOpSub NameLoad Call NameLoad keyword Num Assign NameStore BinOpSub NameLoad Call NameLoad keyword Num Assign NameStore Call AttributeLoad NameLoad attr SubscriptLoad SubscriptLoad AttributeLoad NameLoad attr Index Str Index Str Assign SubscriptStore NameLoad Index Str NameLoad Assign SubscriptStore NameLoad Index Str NameLoad Assign SubscriptStore NameLoad Index Str AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assign NameStore Call AttributeLoad NameLoad attr SubscriptLoad SubscriptLoad AttributeLoad NameLoad attr Index Str Index Str Assign SubscriptStore NameLoad Index Str NameLoad Assign SubscriptStore NameLoad Index Str NameLoad Assign SubscriptStore NameLoad Index Str AttributeLoad NameLoad attr Assign SubscriptStore NameLoad Index Str Call AttributeLoad NameLoad attr Assign SubscriptStore SubscriptLoad NameLoad Index Str Index Str Call NameLoad AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr NameLoad Assign NameStore Call AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Call NameLoad NameLoad Num Expr Call AttributeLoad NameLoad attr Call NameLoad NameLoad Num Expr Call NameLoad keyword NameLoad keyword BinOpSub NameLoad Call NameLoad keyword Num Assign NameStore Call AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Call NameLoad NameLoad Num Expr Call AttributeLoad NameLoad attr Call NameLoad NameLoad Num decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore Call AttributeLoad NameLoad attr Assign NameStore BinOpSub NameLoad Call NameLoad keyword Num Assign NameStore Call AttributeLoad NameLoad attr SubscriptLoad SubscriptLoad AttributeLoad NameLoad attr Index Str Index Str Assign SubscriptStore NameLoad Index Str NameLoad Assign SubscriptStore NameLoad Index Str AttributeLoad NameLoad attr Assign SubscriptStore NameLoad Index Str Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr NameLoad Assign NameStore Call AttributeLoad NameLoad attr SubscriptLoad SubscriptLoad AttributeLoad NameLoad attr Index Str Index Str Assign SubscriptStore NameLoad Index Str NameLoad Assign SubscriptStore NameLoad Index Str AttributeLoad NameLoad attr Assign SubscriptStore NameLoad Index Str Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr NameLoad Assign NameStore Call AttributeLoad NameLoad attr SubscriptLoad SubscriptLoad AttributeLoad NameLoad attr Index Str Index Str Assign SubscriptStore NameLoad Index Str NameLoad Assign SubscriptStore NameLoad Index Str AttributeLoad NameLoad attr Assign SubscriptStore NameLoad Index Str Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr NameLoad Assign NameStore Call AttributeLoad NameLoad attr SubscriptLoad SubscriptLoad AttributeLoad NameLoad attr Index Str Index Str Assign SubscriptStore NameLoad Index Str NameLoad Assign SubscriptStore NameLoad Index Str AttributeLoad NameLoad attr Assign SubscriptStore NameLoad Index Str Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr NameLoad Assign NameStore Call AttributeLoad NameLoad attr SubscriptLoad SubscriptLoad AttributeLoad NameLoad attr Index Str Index Str Assign SubscriptStore NameLoad Index Str NameLoad Assign SubscriptStore NameLoad Index Str AttributeLoad NameLoad attr Assign SubscriptStore NameLoad Index Str Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr Call NameLoad Call AttributeLoad NameLoad attr Num Expr Call NameLoad keyword NameLoad keyword BinOpSub NameLoad Call NameLoad keyword Num keyword NameLoad Expr Call AttributeLoad NameLoad attr Call NameLoad Call AttributeLoad NameLoad attr Num Expr Call NameLoad keyword NameLoad keyword BinOpSub NameLoad Call NameLoad keyword Num keyword NameLoad Expr Call AttributeLoad NameLoad attr Call NameLoad Call AttributeLoad NameLoad attr Num decorator_list decorator_list
N/A N/A copy datetime timedelta N/A bson st2common log logging st2common.garbage_collection.executions purge_executions st2common.constants action action_constants st2common.persistence.execution ActionExecution st2common.persistence.liveaction LiveAction st2common.util date date_utils st2tests.base CleanDbTestCase st2tests.fixturesloader FixturesLoader N/A LOG N/A N/A logging getLogger __name__ N/A TEST_FIXTURES N/A executions liveactions N/A execution1.yaml N/A liveaction4.yaml TestPurgeExecutions N/A CleanDbTestCase N/A setUpClass N/A N/A cls N/A N/A N/A N/A N/A CleanDbTestCase setUpClass N/A N/A N/A N/A super TestPurgeExecutions cls setUpClass N/A classmethod setUp N/A N/A self N/A N/A N/A N/A N/A N/A super TestPurgeExecutions self setUp N/A fixtures_loader N/A FixturesLoader N/A N/A self models N/A N/A fixtures_loader load_models fixtures_pack generic fixtures_dict TEST_FIXTURES N/A test_no_timestamp_doesnt_delete_things N/A N/A self N/A N/A N/A now N/A N/A date_utils get_datetime_utc_now N/A exec_model N/A N/A copy deepcopy N/A N/A N/A self models N/A executions N/A execution1.yaml N/A N/A exec_model N/A start_timestamp N/A now N/A timedelta days 15 N/A N/A exec_model N/A end_timestamp N/A now N/A timedelta days 14 N/A N/A exec_model N/A status N/A action_constants LIVEACTION_STATUS_SUCCEEDED N/A N/A exec_model N/A id N/A N/A bson ObjectId N/A N/A N/A ActionExecution add_or_update exec_model N/A execs N/A N/A ActionExecution get_all N/A N/A N/A self assertEqual N/A len execs 1 N/A expected_msg Specify a valid timestamp N/A N/A N/A self assertRaisesRegexp ValueError expected_msg purge_executions logger LOG timestamp None N/A execs N/A N/A ActionExecution get_all N/A N/A N/A self assertEqual N/A len execs 1 N/A test_purge_executions_with_action_ref N/A N/A self N/A N/A N/A now N/A N/A date_utils get_datetime_utc_now N/A exec_model N/A N/A copy deepcopy N/A N/A N/A self models N/A executions N/A execution1.yaml N/A N/A exec_model N/A start_timestamp N/A now N/A timedelta days 15 N/A N/A exec_model N/A end_timestamp N/A now N/A timedelta days 14 N/A N/A exec_model N/A status N/A action_constants LIVEACTION_STATUS_SUCCEEDED N/A N/A exec_model N/A id N/A N/A bson ObjectId N/A N/A N/A ActionExecution add_or_update exec_model N/A execs N/A N/A ActionExecution get_all N/A N/A N/A self assertEqual N/A len execs 1 N/A N/A purge_executions logger LOG action_ref core.localzzz timestamp N/A now N/A timedelta days 10 N/A execs N/A N/A ActionExecution get_all N/A N/A N/A self assertEqual N/A len execs 1 N/A N/A purge_executions logger LOG action_ref core.local timestamp N/A now N/A timedelta days 10 N/A execs N/A N/A ActionExecution get_all N/A N/A N/A self assertEqual N/A len execs 0 N/A test_purge_executions_with_timestamp N/A N/A self N/A N/A N/A now N/A N/A date_utils get_datetime_utc_now N/A exec_model N/A N/A copy deepcopy N/A N/A N/A self models N/A executions N/A execution1.yaml N/A N/A exec_model N/A start_timestamp N/A now N/A timedelta days 15 N/A N/A exec_model N/A end_timestamp N/A now N/A timedelta days 14 N/A N/A exec_model N/A status N/A action_constants LIVEACTION_STATUS_SUCCEEDED N/A N/A exec_model N/A id N/A N/A bson ObjectId N/A N/A N/A ActionExecution add_or_update exec_model N/A exec_model N/A N/A copy deepcopy N/A N/A N/A self models N/A executions N/A execution1.yaml N/A N/A exec_model N/A start_timestamp N/A now N/A timedelta days 22 N/A N/A exec_model N/A end_timestamp N/A now N/A timedelta days 21 N/A N/A exec_model N/A status N/A action_constants LIVEACTION_STATUS_SUCCEEDED N/A N/A exec_model N/A id N/A N/A bson ObjectId N/A N/A N/A ActionExecution add_or_update exec_model N/A execs N/A N/A ActionExecution get_all N/A N/A purge_executions logger LOG timestamp N/A now N/A timedelta days 20 N/A execs N/A N/A ActionExecution get_all N/A N/A N/A self assertEqual N/A len execs 1 N/A test_liveaction_gets_deleted N/A N/A self N/A N/A N/A now N/A N/A date_utils get_datetime_utc_now N/A start_ts N/A now N/A timedelta days 15 N/A end_ts N/A now N/A timedelta days 14 N/A liveaction_model N/A N/A copy deepcopy N/A N/A N/A self models N/A liveactions N/A liveaction4.yaml N/A N/A liveaction_model N/A start_timestamp start_ts N/A N/A liveaction_model N/A end_timestamp end_ts N/A N/A liveaction_model N/A status N/A action_constants LIVEACTION_STATUS_SUCCEEDED N/A liveaction N/A N/A LiveAction add_or_update liveaction_model N/A exec_model N/A N/A copy deepcopy N/A N/A N/A self models N/A executions N/A execution1.yaml N/A N/A exec_model N/A start_timestamp start_ts N/A N/A exec_model N/A end_timestamp end_ts N/A N/A exec_model N/A status N/A action_constants LIVEACTION_STATUS_SUCCEEDED N/A N/A exec_model N/A id N/A N/A bson ObjectId N/A N/A N/A exec_model N/A liveaction N/A id N/A str N/A liveaction id N/A N/A N/A ActionExecution add_or_update exec_model N/A liveactions N/A N/A LiveAction get_all N/A executions N/A N/A ActionExecution get_all N/A N/A N/A self assertEqual N/A len liveactions 1 N/A N/A N/A self assertEqual N/A len executions 1 N/A N/A purge_executions logger LOG timestamp N/A now N/A timedelta days 10 N/A liveactions N/A N/A LiveAction get_all N/A executions N/A N/A ActionExecution get_all N/A N/A N/A self assertEqual N/A len executions 0 N/A N/A N/A self assertEqual N/A len liveactions 0 N/A test_purge_incomplete N/A N/A self N/A N/A N/A now N/A N/A date_utils get_datetime_utc_now N/A start_ts N/A now N/A timedelta days 15 N/A exec_model N/A N/A copy deepcopy N/A N/A N/A self models N/A executions N/A execution1.yaml N/A N/A exec_model N/A start_timestamp start_ts N/A N/A exec_model N/A status N/A action_constants LIVEACTION_STATUS_SCHEDULED N/A N/A exec_model N/A id N/A N/A bson ObjectId N/A N/A N/A ActionExecution add_or_update exec_model N/A exec_model N/A N/A copy deepcopy N/A N/A N/A self models N/A executions N/A execution1.yaml N/A N/A exec_model N/A start_timestamp start_ts N/A N/A exec_model N/A status N/A action_constants LIVEACTION_STATUS_RUNNING N/A N/A exec_model N/A id N/A N/A bson ObjectId N/A N/A N/A ActionExecution add_or_update exec_model N/A exec_model N/A N/A copy deepcopy N/A N/A N/A self models N/A executions N/A execution1.yaml N/A N/A exec_model N/A start_timestamp start_ts N/A N/A exec_model N/A status N/A action_constants LIVEACTION_STATUS_DELAYED N/A N/A exec_model N/A id N/A N/A bson ObjectId N/A N/A N/A ActionExecution add_or_update exec_model N/A exec_model N/A N/A copy deepcopy N/A N/A N/A self models N/A executions N/A execution1.yaml N/A N/A exec_model N/A start_timestamp start_ts N/A N/A exec_model N/A status N/A action_constants LIVEACTION_STATUS_CANCELING N/A N/A exec_model N/A id N/A N/A bson ObjectId N/A N/A N/A ActionExecution add_or_update exec_model N/A exec_model N/A N/A copy deepcopy N/A N/A N/A self models N/A executions N/A execution1.yaml N/A N/A exec_model N/A start_timestamp start_ts N/A N/A exec_model N/A status N/A action_constants LIVEACTION_STATUS_REQUESTED N/A N/A exec_model N/A id N/A N/A bson ObjectId N/A N/A N/A ActionExecution add_or_update exec_model N/A N/A N/A self assertEqual N/A len N/A N/A ActionExecution get_all 5 N/A N/A purge_executions logger LOG timestamp N/A now N/A timedelta days 10 purge_incomplete False N/A N/A N/A self assertEqual N/A len N/A N/A ActionExecution get_all 5 N/A N/A purge_executions logger LOG timestamp N/A now N/A timedelta days 10 purge_incomplete True N/A N/A N/A self assertEqual N/A len N/A N/A ActionExecution get_all 0 N/A N/A