add WaitFunction in operate

This commit is contained in:
root
2021-08-17 11:51:17 +00:00
parent 729e1e1176
commit f2ee21b683
13 changed files with 340 additions and 138 deletions
+8
View File
@@ -454,6 +454,14 @@ function setConfigResponse($response)
return json_decode( $response, true )['Response'];
}
function WaitFunction() {
//$trynum = 0;
//while( json_decode(getfunctioninfo($_SERVER['function_name'], $_SERVER['Region'], $_SERVER['namespace'], getConfig('SecretId'), getConfig('SecretKey')),true)['Response']['Status']!='Active' ) echo '
//'.++$trynum;
if ( json_decode(getfunctioninfo($_SERVER['function_name'], $_SERVER['Region'], $_SERVER['namespace'], getConfig('SecretId'), getConfig('SecretKey')),true)['Response']['Status']=='Active' ) return true;
else return false;
}
function updateProgram($function_name, $Region, $Namespace, $SecretId, $SecretKey, $source)
{
$secretId = $SecretId;