use local tmp directory
Some checks failed
MVS Upload & Execute / upload-and-run (push) Failing after 12s
Some checks failed
MVS Upload & Execute / upload-and-run (push) Failing after 12s
This commit is contained in:
parent
9153dffb86
commit
97c342693c
@ -5,6 +5,10 @@ import subprocess
|
||||
import tempfile
|
||||
import os
|
||||
|
||||
# Force temp files into a folder inside your project (fully owned by you)
|
||||
custom_temp_dir = os.path.join(os.getcwd(), "tmp")
|
||||
os.makedirs(custom_temp_dir, exist_ok=True)
|
||||
tempfile.tempdir = custom_temp_dir
|
||||
|
||||
SRCLIB = "src"
|
||||
JCLLIB = "jcl"
|
||||
@ -50,6 +54,7 @@ def upload_source(local_file, dataset_name, member_name, mvshost=MVSHOST):
|
||||
# Use cat to read the file and pipe to netcat
|
||||
# cmd = f"cat {tmpfile_path} | nc -w3 {mvshost} {RDRPORT}"
|
||||
cmd = f"nc -w 5 {mvshost} {RDRPORT} < {tmpfile_path}"
|
||||
print(cmd)
|
||||
subprocess.run(cmd, shell=True, check=True)
|
||||
print(f"Uploaded {local_file} to {dataset_name}({member_name})")
|
||||
return 0
|
||||
@ -69,7 +74,6 @@ def submit_jcl(job, mvshost="oldcomputernerd.com"):
|
||||
return 1
|
||||
|
||||
subcmd = f"nc -w 5 {mvshost} {RDRPORT} < {subjcl}"
|
||||
# subcmd = f"cat {subjcl} | nc -w3 {mvshost} {RDRPORT}"
|
||||
|
||||
try:
|
||||
subprocess.run(subcmd, shell=True, check=True)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user