mirror of
https://github.com/firestar5683/StarPilot.git
synced 2026-07-03 04:22:09 +08:00
Cloudlog: cleanup zmq cloudlog warnings (#28896)
* Laikad: cleanup zmq cloudlog warnings * Handle in cloudlog * whitespace * whitespace * suppress before reconnecting in thread old-commit-hash: 8f3037c956343453957571b61cfd1c3063cbbbab
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
import logging
|
||||
import os
|
||||
import time
|
||||
import warnings
|
||||
from pathlib import Path
|
||||
from logging.handlers import BaseRotatingHandler
|
||||
|
||||
@@ -90,6 +91,8 @@ class UnixDomainSocketHandler(logging.Handler):
|
||||
|
||||
def emit(self, record):
|
||||
if os.getpid() != self.pid:
|
||||
# TODO suppresses warning about forking proc with zmq socket, fix root cause
|
||||
warnings.filterwarnings("ignore", category=ResourceWarning, message="unclosed.*<zmq.*>")
|
||||
self.connect()
|
||||
|
||||
msg = self.format(record).rstrip('\n')
|
||||
|
||||
Reference in New Issue
Block a user