'as-complete', 'group' => 'scheduled-actions', 'status' => 'complete', 'label' => __( 'Old finished actions', 'admin-powerups-for-woocommerce' ), 'description' => __( 'Background jobs that finished longer ago than Action Scheduler keeps them. Action Scheduler removes these a few at a time; this clears a backlog.', 'admin-powerups-for-woocommerce' ), 'consequence' => __( 'Deletes those actions and their logs, exactly as Action Scheduler’s own clean-up would. Waiting, running and failed actions stay.', 'admin-powerups-for-woocommerce' ), 'risk' => DevGuard::REVIEW, 'tables' => array( $tables['actions'], $tables['logs'] ), 'unavailable' => $unavailable, ) ), new ActionHistoryCheck( array( 'id' => 'as-canceled', 'group' => 'scheduled-actions', 'status' => 'canceled', 'label' => __( 'Old canceled actions', 'admin-powerups-for-woocommerce' ), 'description' => __( 'Background jobs canceled before they ran, scheduled longer ago than Action Scheduler keeps finished ones.', 'admin-powerups-for-woocommerce' ), 'consequence' => __( 'Deletes those actions and their logs. Waiting, running and failed actions stay.', 'admin-powerups-for-woocommerce' ), 'risk' => DevGuard::REVIEW, 'tables' => array( $tables['actions'], $tables['logs'] ), 'unavailable' => $unavailable, ) ), new OrphanRowsCheck( array( 'id' => 'as-orphan-logs', 'group' => 'scheduled-actions', 'label' => __( 'Action logs without an action', 'admin-powerups-for-woocommerce' ), 'description' => __( 'Log lines of scheduled actions that no longer exist.', 'admin-powerups-for-woocommerce' ), 'consequence' => __( 'Deletes those log lines. They belong to nothing, so nothing shows them.', 'admin-powerups-for-woocommerce' ), 'risk' => DevGuard::SAFE, 'slow' => true, 'unavailable' => $unavailable, 'targets' => array( array( 'table' => $tables['logs'], 'key' => 'log_id', 'fk' => 'action_id', ), ), 'parents' => array( array( 'table' => $tables['actions'], 'column' => 'action_id', ), ), 'sample' => array( 'columns' => array( 'log_id' => __( 'Log ID', 'admin-powerups-for-woocommerce' ), 'action_id' => __( 'Missing action ID', 'admin-powerups-for-woocommerce' ), 'log_date_gmt' => __( 'Date (UTC)', 'admin-powerups-for-woocommerce' ), ), ), ) ), ); } }