File tree 1 file changed +16
-0
lines changed
src/aleph_client/commands/instance 1 file changed +16
-0
lines changed Original file line number Diff line number Diff line change @@ -875,6 +875,22 @@ async def _show_instances(messages: builtins.list[InstanceMessage]):
875
875
decision_text = Text .assemble (f"[{ decision } ] { description } " , style = "yellow" )
876
876
additional_infos .append (Text .assemble ("\n Scheduler: " , decision_text ))
877
877
878
+ async with aiohttp .ClientSession () as session :
879
+ request = await session .get (f'{ info ["crn_url" ]} /about/executions/records' )
880
+ running_instances = await request .json ()
881
+ for running_instance in running_instances :
882
+ if running_instance .get ("vm_hash" ) == item_hash_link .plain :
883
+ additional_infos .append (
884
+ Text .assemble (
885
+ "\n CRN: " , Text .assemble (f"started at { running_instance ['time_started' ]} " , style = "blue" )
886
+ )
887
+ )
888
+ break
889
+ else :
890
+ additional_infos .append (
891
+ Text .assemble ("\n CRN: " , Text .assemble ("not listed on the CRN" , style = "orange1" ))
892
+ )
893
+
878
894
instance = Text .assemble (
879
895
"Item Hash ↓\t Name: " ,
880
896
name ,
You can’t perform that action at this time.
0 commit comments