403Webshell
Server IP : 62.60.133.156  /  Your IP : 216.73.217.51
Web Server : LiteSpeed
System : Linux linux24.centraldnserver.com 4.18.0-553.141.2.lve.el8.x86_64 #1 SMP Wed Jul 8 16:10:02 UTC 2026 x86_64
User : mimradmin ( 1166)
PHP Version : 7.4.33
Disable Function : show_source, system, shell_exec, passthru, exec, popen, proc_open
MySQL : OFF |  cURL : ON |  WGET : ON |  Perl : ON |  Python : ON |  Sudo : OFF |  Pkexec : OFF
Directory :  /home/mimradmin/.trash/wp-content/plugins/wp-rocket/inc/Engine/Preload/Controller/

Upload File :
current_dir [ Writeable] document_root [ Writeable]

 

Command :


[ Back ]     

Current File : /home/mimradmin/.trash/wp-content/plugins/wp-rocket/inc/Engine/Preload/Controller/CheckFinished.php
<?php

namespace WP_Rocket\Engine\Preload\Controller;

use WP_Rocket\Engine\Preload\Admin\Settings;
use WP_Rocket\Engine\Preload\Database\Queries\Cache;

class CheckFinished {

	/**
	 * Preload settings.
	 *
	 * @var Settings
	 */
	protected $settings;

	/**
	 * Preload queue.
	 *
	 * @var Queue
	 */
	protected $queue;

	/**
	 * Db query.
	 *
	 * @var Cache
	 */
	protected $query;

	/**
	 * Instantiate class.
	 *
	 * @param Settings $settings Preload settings.
	 * @param Cache    $cache Db query.
	 * @param Queue    $queue Preload queue.
	 */
	public function __construct( Settings $settings, Cache $cache, Queue $queue ) {
		$this->settings = $settings;
		$this->query    = $cache;
		$this->queue    = $queue;
	}

	/**
	 * Check if the preload is finished.
	 *
	 * @return void
	 */
	public function check_finished() {
		if ( ( ! $this->queue->has_remaining_tasks() && ! $this->query->has_pending_jobs() ) || ! $this->settings->is_enabled() ) {
			delete_transient( 'wpr_preload_running' );
			return;
		}

		$this->queue->add_job_preload_job_check_finished_async();
	}
}

Youez - 2016 - github.com/yon3zu