[+] update pr34

1. update cli_boostrap.py example;
  1.1. allow to force whl_cache update;
    not reset;
  1.2. log more command calls, before executing them;
  2. update oom_firefox,
    to produce some logs;
  2.1. still not practical solution,
    since tabs crash very fast,
    and no integration with the browser,
    to say extensions killing,
    which happens still for some reason;
  3. reuse pr34_logging.setup();
This commit is contained in:
Siarhei Siniak 2026-02-04 11:39:47 +03:00
parent d68670f624
commit 79a1296281
7 changed files with 90 additions and 45 deletions

@ -5,7 +5,7 @@ project(
).stdout().strip('\n'),
# 'online.fxreader.uv',
# ['c', 'cpp'],
version: '0.1.5.62',
version: '0.1.5.65',
# default_options: [
# 'cpp_std=c++23',
# # 'prefer_static=true',

@ -358,6 +358,12 @@ class BootstrapSettings:
'--offline -U',
).split(),
)
whl_cache_update: Optional[bool] = dataclasses.field(
default_factory=lambda: os.environ.get(
'WHL_CACHE_UPDATE', json.dumps(False)
)
in [json.dumps(True)]
)
@classmethod
def get(
@ -520,8 +526,7 @@ def env_bootstrap(
f.write('\n'.join(requirements_in))
f.flush()
subprocess.check_call(
[
cmd = [
'uv',
'pip',
'compile',
@ -535,11 +540,16 @@ def env_bootstrap(
str(requirements_path),
f.name,
]
)
if not bootstrap_settings.env_path.exists():
subprocess.check_call(
[
logger.info(dict(cmd=cmd))
subprocess.check_call(cmd)
# if not bootstrap_settings.env_path.exists():
if (
not bootstrap_settings.whl_cache_path.exists()
or bootstrap_settings.whl_cache_update
):
cmd = [
'pip',
'download',
'--only-binary=:all:',
@ -550,7 +560,10 @@ def env_bootstrap(
'-d',
str(bootstrap_settings.whl_cache_path),
]
)
logger.info(dict(cmd=cmd))
subprocess.check_call(cmd)
cache_find_links_args = (
'-f',
@ -563,7 +576,12 @@ def env_bootstrap(
*[
o
for o in bootstrap_settings.uv_args
if not o in ['-U', '--upgrade']
if not o
in [
'-U',
'--upgrade',
'--no-index',
]
],
'venv',
*venv_python_version,
@ -573,8 +591,7 @@ def env_bootstrap(
]
)
subprocess.check_call(
[
cmd = [
'uv',
'pip',
'install',
@ -588,7 +605,10 @@ def env_bootstrap(
'-r',
str(requirements_path),
]
)
logger.info(dict(cmd=cmd))
subprocess.check_call(cmd)
if bootstrap_settings.pip_check_conflicts:
subprocess.check_call(

@ -12,6 +12,8 @@ import textwrap
import optparse
import traceback
from . import logging as pr34_logging
from typing import (
Any,
Optional,
@ -60,7 +62,8 @@ def get_info(
def run(argv: list[str]):
logging.basicConfig(level=logging.INFO)
# logging.basicConfig(level=logging.INFO)
pr34_logging.setup()
assert isinstance(argv, list) and all([isinstance(o, str) for o in argv])

@ -417,6 +417,19 @@ def main():
if total > limit:
to_free = total - kill_to
logger.info(
dict(
total=total,
limit=limit,
kill_to=kill_to,
to_free=to_free,
low_priority_pids=low_priority_pids,
worker_regex=args.worker_regex,
main_regex=args.main_regex,
)
)
killed, freed = kill_prioritized(
procs,
to_free,

BIN
releases/whl/online_fxreader_pr34-0.1.5.63-py3-none-any.whl (Stored with Git LFS) Normal file

Binary file not shown.

BIN
releases/whl/online_fxreader_pr34-0.1.5.64-py3-none-any.whl (Stored with Git LFS) Normal file

Binary file not shown.

BIN
releases/whl/online_fxreader_pr34-0.1.5.65-py3-none-any.whl (Stored with Git LFS) Normal file

Binary file not shown.