Changeset 3433173
- Timestamp:
- 01/06/2026 02:43:13 AM (7 weeks ago)
- Location:
- calliope/trunk
- Files:
-
- 5 edited
-
calliope.php (modified) (1 diff)
-
readme-es.txt (modified) (2 diffs)
-
readme-ja.txt (modified) (2 diffs)
-
readme.txt (modified) (2 diffs)
-
src/Scheduler/Scheduler.php (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
calliope/trunk/calliope.php
r3432031 r3433173 4 4 Plugin URI: https://wordpress.org/plugins/calliope/ 5 5 Description: WordPress AI Contents Generator - Automatically generate high-quality content using AI technology 6 Version: 3.0.1 66 Version: 3.0.17 7 7 Author: homio13 8 8 Author URI: https://profiles.wordpress.org/homio13/ -
calliope/trunk/readme-es.txt
r3432031 r3433173 5 5 Tested up to: 6.9 6 6 Requires PHP: 7.4 7 Stable tag: 3.0.1 67 Stable tag: 3.0.17 8 8 License: GPLv2 or later 9 9 License URI: https://www.gnu.org/licenses/gpl-2.0.html … … 128 128 == Changelog == 129 129 130 = 3.0.17 = 131 * 🔧 **Corrección de Errores**: Mejorado el programador para usar nombres de hooks únicos por feed para prevenir conflictos de eventos cron al procesar múltiples feeds simultáneamente 132 130 133 = 3.0.16 = 131 134 * 🔧 **Corrección de Errores**: Solucionado el problema donde los artículos no se generaban correctamente al ejecutar el programador de generación automática con múltiples feeds -
calliope/trunk/readme-ja.txt
r3432031 r3433173 5 5 Tested up to: 6.9 6 6 Requires PHP: 7.4 7 Stable tag: 3.0.1 67 Stable tag: 3.0.17 8 8 License: GPLv2 or later 9 9 License URI: https://www.gnu.org/licenses/gpl-2.0.html … … 128 128 == Changelog == 129 129 130 = 3.0.17 = 131 * 🔧 **バグ修正**: 複数フィードの同時処理時のcronイベント競合を防ぐため、フィードごとにユニークなフック名を使用するようスケジューラを改善 132 130 133 = 3.0.16 = 131 134 * 🔧 **バグ修正**: 複数のフィードで自動生成スケジューラを実行した際に記事が正しく生成されない問題を修正 -
calliope/trunk/readme.txt
r3432031 r3433173 5 5 Tested up to: 6.9 6 6 Requires PHP: 7.4 7 Stable tag: 3.0.1 67 Stable tag: 3.0.17 8 8 License: GPLv2 or later 9 9 License URI: https://www.gnu.org/licenses/gpl-2.0.html … … 128 128 == Changelog == 129 129 130 = 3.0.17 = 131 * 🔧 **Bug Fix**: Improved scheduler to use unique hook names per feed to prevent cron event conflicts when processing multiple feeds simultaneously 132 130 133 = 3.0.16 = 131 134 * 🔧 **Bug Fix**: Fixed issue where articles were not generated correctly when running automatic generation scheduler with multiple feeds -
calliope/trunk/src/Scheduler/Scheduler.php
r3432031 r3433173 27 27 function __construct($_is_test_exec = false) 28 28 { 29 $this->add_single_action('cron_generate_related_keyword');30 $this-> add_single_action('cron_generate_article');31 $this->add_single_action('cron_generate_post'); 29 // スケジュール済みのcronイベントに対応する動的アクションを登録 30 $this->register_dynamic_actions(); 31 32 32 $this->is_test_exec = $_is_test_exec; 33 33 } … … 358 358 function add_single_event($action_name, $time, $args) 359 359 { 360 $args = json_encode($args); 361 // 引数のハッシュ値を使って微小な時間差を作る(複数フィードが同時処理される際の重複を回避) 362 $unique_offset = abs(crc32($args)) % 60; 363 $schedule_time = time() + $time + $unique_offset; 364 365 wp_schedule_single_event($schedule_time, $this->get_cron_slug($action_name), [$args]); 360 $uid = $args['uid']; 361 $args_json = json_encode($args); 362 $schedule_time = time() + $time; 363 364 // フック名にuidを付与してユニークにする(複数フィードの同時処理での競合を回避) 365 $unique_hook = $this->get_cron_slug($action_name) . '_' . $uid; 366 367 // 現在のリクエストでイベントが実行される場合に備えて、アクションを登録 368 add_action($unique_hook, [$this, $action_name]); 369 370 wp_schedule_single_event($schedule_time, $unique_hook, [$args_json]); 366 371 } 367 372 … … 403 408 } 404 409 405 ///// actionを登録する 406 function add_single_action($action_name) 407 { 408 add_action($this->get_cron_slug($action_name), [$this, $action_name]); 410 ///// スケジュール済みのcronイベントに対応するアクションを動的に登録する 411 function register_dynamic_actions() 412 { 413 $crons = _get_cron_array(); 414 if (empty($crons)) { 415 return; 416 } 417 418 // 対象となるベースアクション名 419 $base_actions = [ 420 'cron_generate_related_keyword', 421 'cron_generate_article', 422 'cron_generate_post' 423 ]; 424 425 foreach ($crons as $timestamp => $hooks) { 426 foreach ($hooks as $hook => $events) { 427 // calliope_cron_scheduler_XXX_YYY 形式のフックを探す 428 foreach ($base_actions as $base_action) { 429 $base_hook = $this->get_cron_slug($base_action); 430 // フック名がベースフック名で始まり、かつベースフック名より長い場合(uid付き) 431 if (strpos($hook, $base_hook . '_') === 0) { 432 add_action($hook, [$this, $base_action]); 433 } 434 } 435 } 436 } 409 437 } 410 438 }
Note: See TracChangeset
for help on using the changeset viewer.