Skip to content

Commit 8294561

Browse files
systme logs
1 parent 2ee1bbe commit 8294561

File tree

7 files changed

+17
-227
lines changed

7 files changed

+17
-227
lines changed

asset-manifest.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"files": {
33
"main.css": "/static/css/main.02152627.css",
4-
"main.js": "/static/js/main.2f99fbaf.js",
4+
"main.js": "/static/js/main.ea42a658.js",
55
"static/media/roboto-all-500-normal.woff": "/static/media/roboto-all-500-normal.0ab669b7a0d19b178f57.woff",
66
"static/media/roboto-all-700-normal.woff": "/static/media/roboto-all-700-normal.a457fde362a540fcadff.woff",
77
"static/media/roboto-all-400-normal.woff": "/static/media/roboto-all-400-normal.c5d001fa922fa66a147f.woff",
@@ -36,10 +36,10 @@
3636
"static/media/roboto-greek-ext-700-normal.woff2": "/static/media/roboto-greek-ext-700-normal.bd9854c751441ccc1a70.woff2",
3737
"index.html": "/index.html",
3838
"main.02152627.css.map": "/static/css/main.02152627.css.map",
39-
"main.2f99fbaf.js.map": "/static/js/main.2f99fbaf.js.map"
39+
"main.ea42a658.js.map": "/static/js/main.ea42a658.js.map"
4040
},
4141
"entrypoints": [
4242
"static/css/main.02152627.css",
43-
"static/js/main.2f99fbaf.js"
43+
"static/js/main.ea42a658.js"
4444
]
4545
}

index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
<!doctype html><html lang="en"><head><meta charset="utf-8"/><link rel="icon" href="/favicon.ico"/><meta name="viewport" content="width=device-width,initial-scale=1"/><meta name="theme-color" content="#000000"/><meta name="description" content="Pioreactor"/><link rel="apple-touch-icon" href="/logo192.png"/><link rel="manifest" href="/manifest.json"/><script defer="defer" src="/static/js/main.2f99fbaf.js"></script><link href="/static/css/main.02152627.css" rel="stylesheet"></head><body><div id="root"></div></body></html>
1+
<!doctype html><html lang="en"><head><meta charset="utf-8"/><link rel="icon" href="/favicon.ico"/><meta name="viewport" content="width=device-width,initial-scale=1"/><meta name="theme-color" content="#000000"/><meta name="description" content="Pioreactor"/><link rel="apple-touch-icon" href="/logo192.png"/><link rel="manifest" href="/manifest.json"/><script defer="defer" src="/static/js/main.ea42a658.js"></script><link href="/static/css/main.02152627.css" rel="stylesheet"></head><body><div id="root"></div></body></html>

pioreactorui/api.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -376,7 +376,7 @@ def get_level_string(min_level: str) -> str:
376376

377377
@api.route("/experiments/<experiment>/recent_logs", methods=["GET"])
378378
def get_recent_logs(experiment: str) -> ResponseReturnValue:
379-
"""Shows event logs from all units"""
379+
"""Shows recent event logs from all units"""
380380

381381
min_level = request.args.get("min_level", "INFO")
382382

@@ -472,11 +472,11 @@ def get_logs_for_unit_and_experiment(pioreactor_unit: str, experiment: str) -> R
472472
on h.pioreactor_unit = l.pioreactor_unit
473473
and h.assigned_at <= l.timestamp
474474
and DATETIME(l.timestamp) <= DATETIME(coalesce(h.unassigned_at, STRFTIME('%Y-%m-%dT%H:%M:%f000Z', 'NOW')), '+5 seconds')
475-
WHERE (l.experiment=? or l.experiment=?)
475+
WHERE (l.experiment=?)
476476
AND (l.pioreactor_unit=? or l.pioreactor_unit=?)
477477
AND ({get_level_string(min_level)})
478478
ORDER BY l.timestamp DESC LIMIT 50 OFFSET {skip};""",
479-
(experiment, UNIVERSAL_EXPERIMENT, pioreactor_unit, UNIVERSAL_IDENTIFIER),
479+
(experiment, pioreactor_unit, UNIVERSAL_IDENTIFIER),
480480
)
481481

482482
return jsonify(recent_logs)

pioreactorui/tasks.py

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -346,12 +346,13 @@ def post_to_worker(
346346
worker: str, endpoint: str, json: dict | None = None, params: dict | None = None
347347
) -> tuple[str, Any]:
348348
try:
349-
r = post_into(resolve_to_address(worker), endpoint, json=json, params=params, timeout=1)
349+
address = resolve_to_address(worker)
350+
r = post_into(address, endpoint, json=json, params=params, timeout=1)
350351
r.raise_for_status()
351352
return worker, r.json() if r.content else None
352353
except (HTTPErrorStatus, HTTPException) as e:
353354
logger.error(
354-
f"Could not post to {worker}'s {endpoint=}, sent {json=} and returned {e}. Check connection?"
355+
f"Could not post to {worker}'s {address=}/{endpoint=}, sent {json=} and returned {e}. Check connection? Check port?"
355356
)
356357
return worker, None
357358
except DecodeError:
@@ -393,15 +394,17 @@ def get_from_worker(
393394
worker: str, endpoint: str, json: dict | None = None, timeout=1.0, return_raw=False
394395
) -> tuple[str, Any]:
395396
try:
396-
r = get_from(resolve_to_address(worker), endpoint, json=json, timeout=timeout)
397+
address = resolve_to_address(worker)
398+
399+
r = get_from(address, endpoint, json=json, timeout=timeout)
397400
r.raise_for_status()
398401
if not return_raw:
399402
return worker, r.json() if r.content else None
400403
else:
401404
return worker, r.content or None
402405
except (HTTPErrorStatus, HTTPException) as e:
403406
logger.error(
404-
f"Could not get from {worker}'s {endpoint=}, sent {json=} and returned {e}. Check connection?"
407+
f"Could not get from {worker}'s {address=}/{endpoint=}, sent {json=} and returned {e}. Check connection? Check port?"
405408
)
406409
return worker, None
407410
except DecodeError:
@@ -436,12 +439,13 @@ def multicast_get_across_cluster(
436439
@huey.task(priority=10)
437440
def patch_to_worker(worker: str, endpoint: str, json: dict | None = None) -> tuple[str, Any]:
438441
try:
439-
r = patch_into(resolve_to_address(worker), endpoint, json=json, timeout=1)
442+
address = resolve_to_address(worker)
443+
r = patch_into(address, endpoint, json=json, timeout=1)
440444
r.raise_for_status()
441445
return worker, r.json() if r.content else None
442446
except (HTTPErrorStatus, HTTPException) as e:
443447
logger.error(
444-
f"Could not PATCH to {worker}'s {endpoint=}, sent {json=} and returned {e}. Check connection?"
448+
f"Could not PATCH to {worker}'s {address=}/{endpoint=}, sent {json=} and returned {e}. Check connection? Check port?"
445449
)
446450
return worker, None
447451
except DecodeError:

static/js/main.2f99fbaf.js

Lines changed: 0 additions & 103 deletions
This file was deleted.

static/js/main.2f99fbaf.js.LICENSE.txt

Lines changed: 0 additions & 110 deletions
This file was deleted.

static/js/main.2f99fbaf.js.map

Lines changed: 0 additions & 1 deletion
This file was deleted.

0 commit comments

Comments
 (0)