##// END OF EJS Templates
%%px --local runs local last...
MinRK -
Show More
@@ -294,16 +294,26 b' class ParallelMagics(Magics):'
294 294 if args.targets:
295 295 save_targets = self.view.targets
296 296 self.view.targets = self._eval_target_str(args.targets)
297 if args.local:
298 self.shell.run_cell(cell)
297 # if running local, don't block until after local has run
298 block = False if args.local else args.block
299 299 try:
300 return self.parallel_execute(cell, block=args.block,
300 ar = self.parallel_execute(cell, block=block,
301 301 groupby=args.groupby,
302 302 save_name=args.save_name,
303 303 )
304 304 finally:
305 305 if args.targets:
306 306 self.view.targets = save_targets
307
308 # run locally after submitting remote
309 if args.local:
310 self.shell.run_cell(cell)
311 # now apply blocking behavor to remote execution
312 block = self.view.block if args.block is None else args.block
313 if block:
314 ar.get()
315 ar.display_outputs(groupby)
316 return ar
307 317
308 318 @skip_doctest
309 319 def autopx(self, line=''):
General Comments 0
You need to be logged in to leave comments. Login now