Skip to content

Commit

Permalink
πŸ“¦ NEW: Standby mode
Browse files Browse the repository at this point in the history
  • Loading branch information
austinginder committed Sep 7, 2024
1 parent a4fd572 commit 146c389
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion lib/local-scripts/site-update-usage.php
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,13 @@
// Update current environment with new data.
( new CaptainCore\Environments )->update( $environment_update, [ "environment_id" => $environment_id ] );

if ( ! empty ( $system->captaincore_standby ) && $system->captaincore_standby == "true" ) {
echo "Standby mode enabled. Skipping remote update.\n";
echo json_encode( $environment_update );
var_dump( $system );
return;
}

// Prepare request to API
$request = [
'method' => 'POST',
Expand All @@ -64,7 +71,7 @@
] ),
];

if ( $system->captaincore_dev ) {
if ( ! empty ( $system->captaincore_dev ) && $system->captaincore_dev == "true" ) {
$request['sslverify'] = false;
}

Expand Down

0 comments on commit 146c389

Please sign in to comment.