feat: database-backed cron job queue replacing JSON file system
Replace file-based JSON cron queue with DB-backed job queue (pp_cron_jobs, pp_cron_schedules). New Domain\CronJob module: CronJobType (constants), CronJobRepository (CRUD, atomic fetch, retry/backoff), CronJobProcessor (orchestration with handler registration). Priority ordering guarantees apilo_send_order (40) runs before sync tasks (50). Includes cron.php auth protection, race condition fix in fetchNext, API response validation, and DI wiring across all entry points. 41 new tests. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -177,9 +177,10 @@ class App
|
||||
'ShopOrder' => function() {
|
||||
global $mdb;
|
||||
$orderRepo = new \Domain\Order\OrderRepository( $mdb );
|
||||
$cronJobRepo = new \Domain\CronJob\CronJobRepository( $mdb );
|
||||
return new \front\Controllers\ShopOrderController(
|
||||
$orderRepo,
|
||||
new \Domain\Order\OrderAdminService( $orderRepo )
|
||||
new \Domain\Order\OrderAdminService( $orderRepo, null, null, null, $cronJobRepo )
|
||||
);
|
||||
},
|
||||
'ShopProducer' => function() {
|
||||
|
||||
Reference in New Issue
Block a user