@@ -891,6 +891,7 @@ def close(self):
891
891
"""Finalize the internal pool of tasks."""
892
892
pass
893
893
894
+
894
895
class PsijWorker (Worker ):
895
896
def __init__ (self , ** kwargs ):
896
897
"""Initialize worker."""
@@ -909,8 +910,8 @@ def make_spec(self, cmd=None, arg=None, cache_dir=None):
909
910
spec = self .psij .JobSpec ()
910
911
spec .executable = cmd
911
912
spec .arguments = arg
912
- spec .stdout_path = ' demo.stdout'
913
- spec .stderr_path = ' demo.stderr'
913
+ spec .stdout_path = " demo.stdout"
914
+ spec .stderr_path = " demo.stderr"
914
915
915
916
return spec
916
917
@@ -921,9 +922,12 @@ def make_job(self, spec, attributes):
921
922
922
923
async def exec_psij (self , runnable , rerun = False ):
923
924
import psij
925
+
924
926
self .psij = psij
925
- jex = psij .JobExecutor .get_instance ('local' )
926
- spec = self .make_spec (runnable .inputs .executable , runnable .inputs .args , runnable .cache_dir )
927
+ jex = psij .JobExecutor .get_instance ("local" )
928
+ spec = self .make_spec (
929
+ runnable .inputs .executable , runnable .inputs .args , runnable .cache_dir
930
+ )
927
931
job = self .make_job (spec , None )
928
932
jex .submit (job )
929
933
return
@@ -932,6 +936,7 @@ def close(self):
932
936
"""Finalize the internal pool of tasks."""
933
937
pass
934
938
939
+
935
940
WORKERS = {
936
941
"serial" : SerialWorker ,
937
942
"cf" : ConcurrentFuturesWorker ,
0 commit comments