update: client.js now waits for websocket connection to be open
This commit is contained in:
@@ -5,7 +5,7 @@ build-backend = "setuptools.build_meta"
|
|||||||
[project]
|
[project]
|
||||||
name = "common"
|
name = "common"
|
||||||
description = "Reusable code stubs"
|
description = "Reusable code stubs"
|
||||||
version = "0.1.12"
|
version = "0.1.13"
|
||||||
requires-python = ">=3.13"
|
requires-python = ">=3.13"
|
||||||
authors = [
|
authors = [
|
||||||
{ name="BreakerBear", email="breakerbear@autistic.men" },
|
{ name="BreakerBear", email="breakerbear@autistic.men" },
|
||||||
|
|||||||
@@ -12,6 +12,10 @@ CONNECTION.addEventListener('message', (e) => {
|
|||||||
else promise.resolve(message.result);
|
else promise.resolve(message.result);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
while (CONNECTION.readyState !== CONNECTION.OPEN) {
|
||||||
|
await new Promise(resolve => setTimeout(resolve, 1000));
|
||||||
|
}
|
||||||
|
|
||||||
const LogRecord = {
|
const LogRecord = {
|
||||||
format: (record) => {
|
format: (record) => {
|
||||||
let ms = record.created * 1000 - new Date().getTimezoneOffset() * 60000;
|
let ms = record.created * 1000 - new Date().getTimezoneOffset() * 60000;
|
||||||
|
|||||||
@@ -75,6 +75,3 @@ def setup(a: WebDriver, b: int, c: float, d: float):
|
|||||||
attempts = b
|
attempts = b
|
||||||
timeout = c
|
timeout = c
|
||||||
interval = d
|
interval = d
|
||||||
|
|
||||||
from common.jsonrpc2.server import connection
|
|
||||||
until(lambda _: connection is not None, watch=False)
|
|
||||||
|
|||||||
Reference in New Issue
Block a user