Skip to content

Commit 622176e

Browse files
authored
Merge pull request #6 from DistributedScience/display_monitor
Print monitor file name at the end of startCluster
2 parents 4c26d54 + c3df77a commit 622176e

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

run.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -423,7 +423,8 @@ def startCluster():
423423

424424
# Step 3: Make the monitor
425425
starttime=str(int(time.time()*1000))
426-
createMonitor=open('files/' + APP_NAME + 'SpotFleetRequestId.json','w')
426+
monitor_file_name='files/' + APP_NAME + 'SpotFleetRequestId.json'
427+
createMonitor=open(monitor_file_name,'w')
427428
createMonitor.write('{"MONITOR_FLEET_ID" : "'+requestInfo['SpotFleetRequestId']+'",\n')
428429
createMonitor.write('"MONITOR_APP_NAME" : "'+APP_NAME+'",\n')
429430
createMonitor.write('"MONITOR_ECS_CLUSTER" : "'+ECS_CLUSTER+'",\n')
@@ -476,6 +477,7 @@ def startCluster():
476477
status = ec2client.describe_spot_fleet_instances(SpotFleetRequestId=requestInfo['SpotFleetRequestId'])
477478

478479
print('Spot fleet successfully created. Your job should start in a few minutes.')
480+
print(f"Your monitor file is available at {monitor_file_name}")
479481

480482
#################################
481483
# SERVICE 4: MONITOR JOB

0 commit comments

Comments
 (0)