Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Revert "Try to unlock the global lock in StructuredLogger after reloading logging" #13111

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 4 additions & 8 deletions tools/serve/serve.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,8 @@
from multiprocessing import Process, Event

from localpaths import repo_root
from six.moves import reload_module

from manifest.sourcefile import read_script_metadata, js_meta_re, parse_variants
from mozlog.structuredlog import StructuredLogger
from wptserve import server as wptserve, handlers
from wptserve import stash
from wptserve import config
Expand Down Expand Up @@ -633,10 +631,9 @@ def stop(self):
def start_ws_server(host, port, paths, routes, bind_address, config, **kwargs):
# Ensure that when we start this in a new process we have the global lock
# in the logging module unlocked
reload_module(logging)
try:
StructuredLogger._lock.release()
except threading.ThreadError:
logging._releaseLock()
except RuntimeError:
pass
return WebSocketDaemon(host,
str(port),
Expand All @@ -650,10 +647,9 @@ def start_ws_server(host, port, paths, routes, bind_address, config, **kwargs):
def start_wss_server(host, port, paths, routes, bind_address, config, **kwargs):
# Ensure that when we start this in a new process we have the global lock
# in the logging module unlocked
reload_module(logging)
try:
StructuredLogger._lock.release()
except threading.ThreadError:
logging._releaseLock()
except RuntimeError:
pass
return WebSocketDaemon(host,
str(port),
Expand Down