🚀 Hostinger Optimized
🖥️ Server: Apache
💻 System: Linux webm015.cluster127.gra.hosting.ovh.net 6.18.42-ovh-vps-grsec-zfs+ #1 SMP PREEMPT_DYNAMIC Wed Aug 5 15:59:48 CEST 2026 x86_64
👤 User: stakrfrcol (69043)
🐘 PHP: 8.3.31
🚫 Disabled: _dyuweyrj4,_dyuweyrj4r,dl

💻 Terminal

📁 /home/stakrfrcol/agency
$

📄 CheckFinished.php

📁 Path: ./wp-content/plugins/wp-rocket/inc/Engine/Preload/Controller/CheckFinished.php
📊 Size: 1.05 KB
🔒 Perm: 0644
📝 MIME: text/x-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();
	}
}
← Back📥 Raw✏️ Edit🔒 Chmod
✨ File Manager Magic ✨