def sighandler(sig, frame): print("sighandler: sig: " + str(sig)) interrupt = (sig != 0) scdc.nodeport_cancel(np_tcp, interrupt) def printmsg(s): print("jobrun_rel: " + s) scdc.log_init("log_FILE", sys.stdout, sys.stderr) printmsg("scdc init") scdc.init() basepath = "rel" dp_rel = scdc.dataprov_open(basepath, "jobrun_relay") np_tcp = scdc.nodeport_open("tcp:max_connections:", 2) signal.signal(signal.SIGABRT, sighandler) signal.signal(signal.SIGTERM, sighandler) signal.signal(signal.SIGINT, sighandler) scdc.nodeport_start(np_tcp, scdc.NODEPORT_START_LOOP_UNTIL_CANCEL) # running
def release(self): print("release_relay:") scdc.dataprov_close(self.dp_relay) def run(self): print("run_relay:") server.run(self) print(str(sys.argv)) print("scdc init") #scdc.init() #scdc.init("log_filepath", "scdclog") scdc.init("log_FILE", sys.stdout, sys.stderr) relay_do = False relay_run = False worker_do = False worker_run = False worker_local = [] worker_relay = False client_do = False client_run = False client_cmds = [] client_jobs = False client_jobs_url = None