Arshit Malik commited on
Commit
ef2dcf8
·
1 Parent(s): 39023f2

fix cache quantization, full kernel logs, copy button

Browse files
Files changed (2) hide show
  1. automation.py +1 -1
  2. status_server.py +2 -0
automation.py CHANGED
@@ -140,7 +140,7 @@ def fetch_kernel_logs(slug: str):
140
  for f in sorted(tmp.rglob("*")):
141
  if f.is_file() and f.suffix in (".log", ".txt", ".html", ".json", ".py"):
142
  try:
143
- content = f.read_text(errors="replace")[:5000]
144
  log.info(f" Kernel file {f.name}:\n{content}")
145
  except Exception:
146
  pass
 
140
  for f in sorted(tmp.rglob("*")):
141
  if f.is_file() and f.suffix in (".log", ".txt", ".html", ".json", ".py"):
142
  try:
143
+ content = f.read_text(errors="replace")
144
  log.info(f" Kernel file {f.name}:\n{content}")
145
  except Exception:
146
  pass
status_server.py CHANGED
@@ -11,6 +11,7 @@ h2{color:#0f0}
11
  #log{background:#000;padding:10px;white-space:pre-wrap;height:80vh;overflow-y:auto;font-size:12px}
12
  </style></head><body>
13
  <h2>YouTube Shorts Pipeline</h2>
 
14
  <p>Full pipeline log (live, updates every 2 seconds):</p>
15
  <pre id="log">Loading...</pre>
16
  <script>
@@ -27,6 +28,7 @@ async function refresh(){
27
  }
28
  refresh();
29
  setInterval(refresh,2000);
 
30
  </script></body></html>"""
31
 
32
  class H(http.server.BaseHTTPRequestHandler):
 
11
  #log{background:#000;padding:10px;white-space:pre-wrap;height:80vh;overflow-y:auto;font-size:12px}
12
  </style></head><body>
13
  <h2>YouTube Shorts Pipeline</h2>
14
+ <button onclick="copyLog()" style="background:#333;color:#0f0;border:1px solid #0f0;padding:5px 15px;cursor:pointer;margin-bottom:10px">Copy Log</button>
15
  <p>Full pipeline log (live, updates every 2 seconds):</p>
16
  <pre id="log">Loading...</pre>
17
  <script>
 
28
  }
29
  refresh();
30
  setInterval(refresh,2000);
31
+ function copyLog(){const t=document.getElementById("log").textContent;navigator.clipboard.writeText(t).then(()=>{const b=document.querySelector("button");b.textContent="Copied!";setTimeout(()=>b.textContent="Copy Log",2000)})}
32
  </script></body></html>"""
33
 
34
  class H(http.server.BaseHTTPRequestHandler):