修改适配Linux

This commit is contained in:
wzy-warehouse
2026-06-24 14:16:23 +08:00
parent e5582bab5d
commit 7163ca67f9
3 changed files with 10 additions and 3 deletions
+1 -1
View File
@@ -139,7 +139,7 @@ class QgisPool:
for line in worker.proc.stderr:
line = line.strip()
if line:
logger.debug(f"[Worker-{worker.worker_id}] stderr: {line}")
logger.info(f"[Worker-{worker.worker_id}] {line}")
except Exception:
pass
+8 -1
View File
@@ -188,4 +188,11 @@ def main():
if __name__ == "__main__":
main()
try:
main()
except Exception as e:
# 捕获 main() 未处理的异常,确保输出到 stderr
import traceback
print(f"[worker] 未捕获异常: {e}", file=sys.stderr)
traceback.print_exc(file=sys.stderr)
sys.exit(1)