Skip to content

Commit

Permalink
v6.1-a4: * **Crawler** CLI will now be able to force crawling even br…
Browse files Browse the repository at this point in the history
…owser operation was fired shortly.
  • Loading branch information
Hai Zheng committed Dec 20, 2023
1 parent 0a347f5 commit 192dc5c
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 6 deletions.
4 changes: 2 additions & 2 deletions litespeed-cache.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* Plugin Name: LiteSpeed Cache
* Plugin URI: https://www.litespeedtech.com/products/cache-plugins/wordpress-acceleration
* Description: High-performance page caching and site optimization from LiteSpeed
* Version: 6.1-a3
* Version: 6.1-a4
* Author: LiteSpeed Technologies
* Author URI: https://www.litespeedtech.com
* License: GPLv3
Expand Down Expand Up @@ -34,7 +34,7 @@
return;
}

!defined('LSCWP_V') && define('LSCWP_V', '6.1-a3');
!defined('LSCWP_V') && define('LSCWP_V', '6.1-a4');

!defined('LSCWP_CONTENT_DIR') && define('LSCWP_CONTENT_DIR', WP_CONTENT_DIR);
!defined('LSCWP_DIR') && define('LSCWP_DIR', __DIR__ . '/'); // Full absolute path '/var/www/html/***/wp-content/plugins/litespeed-cache/' or MU
Expand Down
1 change: 1 addition & 0 deletions readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -253,6 +253,7 @@ The vast majority of plugins and themes are compatible with LiteSpeed Cache. The
= 6.1 - Feb 2024 =
* 🌱**Database** Clear Orphaned Post Meta.
* **Image Optimize** Fixed possible PHP warning for WP requests library response.
* **Crawler** CLI will now be able to force crawling even browser operation was fired shortly.

= 6.0.0.1 - Dec 15 2023 =
* 🐞**Image Optimize** Grouped the taken notification to regional center servers to reduce the load after image pulled.
Expand Down
12 changes: 8 additions & 4 deletions src/crawler.cls.php
Original file line number Diff line number Diff line change
Expand Up @@ -342,9 +342,12 @@ private function _crawl_data($manually_run)

$this->load_conf();

$this->_engine_start();

$this->Release_lane();
try {
$this->_engine_start();
$this->Release_lane();
} catch (\Exception $e) {
self::debug('🛑 ' . $e->getMessage());
}
}

/**
Expand Down Expand Up @@ -605,6 +608,7 @@ private function _touch_lane()
*/
public function Release_lane()
{
self::debug("Release lane");
unlink($this->json_local_path() . '.pid');
}

Expand Down Expand Up @@ -654,7 +658,7 @@ private function _do_running()
if (!$this->_check_valid_lane(true)) {
$this->_end_reason = 'lane_invalid';
self::debug('🛑 The crawler lane is used by newer crawler.');
return;
throw new \Exception("invalid crawler lane");
}
// Update time
$this->_touch_lane();
Expand Down

0 comments on commit 192dc5c

Please sign in to comment.