@@ -429,6 +429,7 @@ def check_licenses(self) -> Dict[str, Any]:
429
429
license_data : Dict [str , Any ] = machine .get ("license" , {})
430
430
license_use : str = license_data .get ("startOfUseDateTime" )
431
431
license_date : datetime = datetime .datetime .strptime (license_use , "%Y-%m-%dT%H:%M:%S.%f%z" )
432
+ print (f"{ machine_name } agent install: { license_date } " )
432
433
delta : timedelta = now - license_date
433
434
if expirationday < delta :
434
435
response_dict [machine_name ] = {
@@ -534,13 +535,14 @@ def launch(self) -> Dict[str, Any]:
534
535
for machine in json .loads (machines_response .text ).get ("items" , []):
535
536
source_props : Dict [str , Any ] = machine .get ("sourceProperties" , {})
536
537
machine_data : Dict [str , Any ] = {}
537
- if _machine == source_props .get ("name" , "NONE" ):
538
+ ce_name = source_props .get ("name" ,"NONE" )
539
+ if _machine == ce_name .upper ():
538
540
if machine .get ("replica" ):
539
541
print ("Target machine already launched" )
540
542
self .event_handler .add_event (Event .EVENT_ALREADY_LAUNCHED , machine_name = _machine )
541
543
continue
542
544
machine_data = {
543
- "items" : [{"machineId" : machine [ "id" ] }],
545
+ "items" : [{"machineId" : ce_name }],
544
546
"launchType" : "TEST" ,
545
547
}
546
548
@@ -563,7 +565,7 @@ def launch(self) -> Dict[str, Any]:
563
565
print ("ERROR: Launch target machine failed!" )
564
566
self .event_handler .add_event (Event .EVENT_FAILED , machine_name = _machine )
565
567
else :
566
- print (f"Machine: ({ source_props ['name' ]} ) - Not a machine we want to launch..." )
568
+ # print(f"Machine: ({source_props['name']}) - Not a machine we want to launch...")
567
569
self .event_handler .add_event (Event .EVENT_IGNORED , machine_name = _machine )
568
570
return response_dict
569
571
0 commit comments