use local tmp directory
Some checks failed
MVS Upload & Execute / upload-and-run (push) Failing after 12s

This commit is contained in:
Gregory Gauthier 2026-02-03 14:39:29 +00:00
parent 9153dffb86
commit 97c342693c
2 changed files with 6 additions and 2 deletions

BIN
.DS_Store vendored Normal file

Binary file not shown.

View File

@ -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)