<?php
/**
 * Action Scheduler: logs for failed actions.
 *
 * @package DatabaseCleanup
 */

namespace DatabaseCleanup\Includes\Tasks;

if ( ! defined( 'ABSPATH' ) ) {
	exit;
}

class Task_As_Failed_Logs extends Abstract_Action_Scheduler_Task {

	public function get_id(): string {
		return 'as_failed_logs';
	}

	public function get_label(): string {
		return __( 'Action Scheduler: failed action logs', 'wp-powersuite' );
	}

	public function get_description(): string {
		return __( 'Remove log rows linked to failed Action Scheduler actions.', 'wp-powersuite' );
	}

	public function is_safe(): bool {
		return true;
	}

	protected function target(): array {
		return [ 'table' => 'logs', 'status' => 'failed', 'log' => true ];
	}
}
