src/Deployment.php
/**
     * Send warming requests to the latest version.
     *
     * @param LambdaFunction $function
     */
Send warming requests to the latest version.
Send warming requests to the latest version .
protected function warmLatestVersion(LambdaFunction $function)
    {
        if ($this->lambda->latestVersionHasAlias($function, 'active')) {
            Sidecar::log('Active version unchanged, no need to warm.');
            return;
        }
        $version = $this->lambda->getLatestVersion($function);
        Sidecar::log("Warming Version $version of {$function->nameWithPrefix()}...");
        $results = Sidecar::warmSingle($function, $async = false, $version);
        if ($warmed = count($results)) {
            Sidecar::log("Warmed $warmed instances.");
        } else {
            Sidecar::log('No instances warmed. If this is unexpected, confirm your `warmingConfig` method is set up correctly.');
        }
    }
protected function warmLatestVersion ( LambdaFunction $ function ) { if ( $ this -> lambda -> latestVersionHasAlias ( $ function , 'active' ) ) { Sidecar :: log ( 'Active version unchanged, no need to warm.' ) ; return ; } $ version = $ this -> lambda -> getLatestVersion ( $ function ) ; Sidecar :: log ( " Warming Version  $ version  of  { $ function -> nameWithPrefix ( ) } ... " ) ; $ results = Sidecar :: warmSingle ( $ function , $ async = false , $ version ) ; if ( $ warmed = count ( $ results ) ) { Sidecar :: log ( " Warmed  $ warmed  instances. " ) ; } else { Sidecar :: log ( 'No instances warmed. If this is unexpected, confirm your `warmingConfig` method is set up correctly.' ) ; } }
Send warming requests to the latest version.
Send warming requests to the latest version .
// Warm the latest version of the function, waiting for the results // to settle. If we didn't wait for the results to settle, we might // activate them immediately while they are still warming.