File tree Expand file tree Collapse file tree 1 file changed +21
-1
lines changed
Expand file tree Collapse file tree 1 file changed +21
-1
lines changed Original file line number Diff line number Diff line change @@ -537,7 +537,8 @@ def __poll_task_results(self):
537537 { next_result }
538538 *********************************************************************************
539539 """ )
540- # notify socket channel of algorithm status change
540+
541+ # notify other nodes about algorithm status change
541542 self .socketIO .emit (
542543 "algorithm_status_change" ,
543544 data = {
@@ -553,6 +554,25 @@ def __poll_task_results(self):
553554 )
554555
555556
557+ #Notify other nodes about algorithm status change
558+ self .log .info (f"Sending result (run={ next_result .run_id } ) to the server!" )
559+
560+ response = self .client .request (f"task/{ next_result .task_id } " )
561+
562+ init_org = response .get ("init_org" )
563+
564+ self .client .run .patch (
565+ id_ = next_result .run_id ,
566+ data = {
567+ "result" : next_result .data ,
568+ "log" :next_result .logs [0 ],
569+ "status" : next_result .status ,
570+ "finished_at" : datetime .datetime .now ().isoformat (),
571+ },
572+ init_org_id = init_org .get ("id" ),
573+ )
574+
575+
556576
557577 except (KeyboardInterrupt , InterruptedError ):
558578 self .log .info ("Node is interrupted, shutting down..." )
You can’t perform that action at this time.
0 commit comments