@@ -472,6 +472,7 @@ public static function wp2staticUISaveAdvancedOptions() : void {
472472 public static function wp2staticEnqueueJobs ( ?int $ post_id = null ) : void {
473473 // check each of these in order we want to enqueue
474474 $ job_types = [
475+ 'autoJobQueueDirectDeployPost ' => 'direct_deploy_post ' ,
475476 'autoJobQueueDetection ' => 'detect ' ,
476477 'autoJobQueueCrawling ' => 'crawl ' ,
477478 'autoJobQueuePostProcessing ' => 'post_process ' ,
@@ -630,7 +631,12 @@ public static function wp2staticProcessQueue() : void {
630631 break ;
631632 case 'direct_deploy ' :
632633 $ deployer = new DirectDeployer ();
633-
634+ WsLog::l ( 'Starting direct deployment ' );
635+ $ deployer ->deploy ();
636+ $ deployer ->deployComplete ();
637+ break ;
638+ case 'direct_deploy_post ' :
639+ $ deployer = new DirectDeployer ();
634640 $ post_id = $ job ->triggering_post_id ;
635641 if ( $ post_id ) {
636642 $ path = wp_make_link_relative (get_permalink ($ post_id ));
@@ -639,12 +645,9 @@ public static function wp2staticProcessQueue() : void {
639645 WsLog::l ( 'Starting direct deployment for path ' . $ path );
640646 $ deployer ->deployPaths ( $ detected );
641647 } else {
642- WsLog::l ( 'Starting direct deployment ' );
643- $ deployer ->deploy ();
648+ WsLog::w ( 'No post ID found for direct deployment post ' );
644649 }
645-
646650 $ deployer ->deployComplete ();
647-
648651 break ;
649652 default :
650653 WsLog::l ( 'Trying to process unknown job type ' );
0 commit comments