<?php

namespace Vendtics\App\Jobs;

defined( "ABSPATH" ) || exit;

use Vendtics\WP_Background_Process;

abstract class Jobs extends WP_Background_Process {
    /**
     * @var string
     */
    protected $prefix = 'vendtics';

    protected function get_default_time_limit() {
        //phpcs:ignore WordPress.NamingConventions.PrefixAllGlobals.DynamicHooknameFound
        return apply_filters( $this->identifier . '_default_time_limit', 20 );
    }

    protected function get_rest_time() {
        return ( $this->start_time + $this->get_default_time_limit() ) - time();
    }
}