Bug 1631026 - Fix mozregression command-line on Windows (#619)

This commit is contained in:
William Lachance 2020-04-17 13:06:25 -04:00 коммит произвёл GitHub
Родитель 66dc72e14b
Коммит a387b604f7
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
1 изменённых файлов: 9 добавлений и 9 удалений

Просмотреть файл

@ -34,6 +34,15 @@ def send_telemetry_ping(variant, appname):
_send_telemetry_ping(variant, appname)
def _send_telemetry_ping_oop(variant, appname, upload_enabled):
initialize_telemetry(upload_enabled)
if upload_enabled:
_send_telemetry_ping(variant, appname)
# we sleep to give glean's async machinery a chance to
# submit the ping
time.sleep(1)
def send_telemetry_ping_oop(variant, appname, upload_enabled):
"""
This somewhat convoluted function forks off a process (using
@ -42,14 +51,5 @@ def send_telemetry_ping_oop(variant, appname, upload_enabled):
call mozregression inside a process which is itself using
Glean for other purposes (e.g. mach)
"""
def _send_telemetry_ping_oop(variant, appname, upload_enabled):
initialize_telemetry(upload_enabled)
if upload_enabled:
_send_telemetry_ping(variant, appname)
# we sleep to give glean's async machinery a chance to
# submit the ping
time.sleep(1)
p = Process(target=_send_telemetry_ping_oop, args=(variant, appname, upload_enabled))
p.start()