Skip to content

Commit a8b008d

Browse files
committed
let jobs keep running after exiting GUI; requires python >= v3.11
1 parent 274dd41 commit a8b008d

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/gui/controller.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
import shutil
1515
import operator
1616
import platform
17+
import sys
1718

1819
bokehlog = logging.getLogger("songexplorer")
1920
#class Object(object):
@@ -42,12 +43,13 @@ def generic_actuate(cmd, logfile, where,
4243
clusterflags += "\"done("+job+")\"&&"
4344
clusterflags = clusterflags[:-2]
4445
if where == "local":
46+
kwargs = {"process_group": 0} if sys.version_info.major == 3 and sys.version_info.minor >= 11 else {}
4547
p = Popen(["hsubmit",
4648
str(ncpu_cores)+','+str(ngpu_cards)+','+str(ngigabyes_memory),
4749
"-o", logfile, "-e", logfile, "-a",
4850
*localdeps,
4951
cmd+" "+' '.join(args)],
50-
stdout=PIPE)
52+
stdout=PIPE, **kwargs)
5153
jobid = p.stdout.readline().decode('ascii').rstrip()
5254
bokehlog.info(jobid)
5355
elif where == "server":

0 commit comments

Comments
 (0)