File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed
Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -216,13 +216,15 @@ as futures complete.
216216 result_fut.then(result_cb)
217217
218218 def result_cb (fut ):
219- print (fut.get_info())
219+ job = fut.get_info()
220+ result = job.result.lower()
221+ print (f " { job.id} : { result} with returncode { job.returncode} " )
220222
221223 flux_handle = flux.Flux()
222224 jobspec = flux.job.JobspecV1.from_command([" /bin/true" ])
223225 for _ in range (5 ):
224226 # submit 5 futures and attach callbacks to each one
225- submit_future = flux.job.submit_async(f , jobspec)
227+ submit_future = flux.job.submit_async(flux_handle , jobspec)
226228 submit_future.then(submit_cb, flux_handle)
227229 # enter the flux event loop (the 'reactor') to trigger the callbacks
228230 # once the futures complete
You can’t perform that action at this time.
0 commit comments