adding debug messages

This commit is contained in:
Gregory Gauthier 2026-02-06 13:13:38 +00:00
parent b39c2a9d9a
commit 51b702d7e7

View File

@ -8,11 +8,11 @@ import subprocess
import requests
from requests.auth import HTTPBasicAuth
CONSOLE_URL = os.environ.get("MVS_CONSOLE_URL")
CONSOLE_USER = os.environ.get("MVS_CONSOLE_USER")
CONSOLE_URL = os.environ.get("MVS_CONSOLE_URL", "http://oldcomputernerd.com:8038/cgi-bin/tasks/syslog")
CONSOLE_USER = os.environ.get("MVS_CONSOLE_USER", "gmgauthier")
CONSOLE_PASS = os.environ.get("MVS_CONSOLE_PASSWORD")
LINODE_HOST = os.environ.get("LINODE_SSH_HOST")
LINODE_PRINTOUT_DIR = os.environ.get("LINODE_PRINTOUT_DIR")
LINODE_HOST = os.environ.get("LINODE_SSH_HOST", "gmgauthier@socrates")
LINODE_PRINTOUT_DIR = os.environ.get("LINODE_PRINTOUT_DIR", "/home/gmgauthier/printouts")
def get_syslog():
"""Fetch the Hercules syslog via HTTP"""
@ -89,7 +89,7 @@ def retrieve_pdf(source_path, local_filename, is_local=False):
"""Retrieve PDF either locally (copy) or remotely (SCP)"""
try:
if is_local:
# Local copy from mounted volume
# Local copy from a mounted volume
import shutil
shutil.copy2(source_path, local_filename)
print(f"Copied: {local_filename}")
@ -111,6 +111,9 @@ def poll_for_job(jn, to=300, poll_interval=5):
print(f"Polling for job: {jobname_upper}")
print(f"Timeout: {to}s, Poll interval: {poll_interval}s")
print(f"Console URL: {CONSOLE_URL}")
print(f"Console User: {CONSOLE_USER}")
print(f"Console Pass: {'***' if CONSOLE_PASS else 'NOT SET'}")
print()
# Phase 1: Find a job number