feat: live Runware model sync with 24h cache and Sync Now button (v0.15.0)

Replace hardcoded model registry with live-sync system.

New PRAutoBlogger_Runware_Model_Catalog class fetches the Runware model
catalog daily, caches in WP options (24h TTL), and falls back to the
hardcoded 15-model list if the API is unavailable. Sync Now button
in PRAdmin for on-demand refresh. Eliminates the drift that caused
silent model fallback bugs (v0.13.8, v0.14.0).
This commit is contained in:
peptiderepo
2026-04-26 11:38:59 +07:00
committed by GitHub
parent 61975d4551
commit 73ac6d12b4
12 changed files with 643 additions and 31 deletions

View File

@@ -130,6 +130,11 @@ class PRAutoBlogger_Activator {
wp_schedule_event( $tomorrow, 'daily', 'prautoblogger_reap_orphan_research_rows' );
}
}
// v0.15.0: daily Runware model catalog sync.
if ( ! wp_next_scheduled( 'prautoblogger_sync_runware_models' ) ) {
wp_schedule_event( time() + HOUR_IN_SECONDS, 'daily', 'prautoblogger_sync_runware_models' );
}
}
/**