File tree Expand file tree Collapse file tree 10 files changed +18
-10
lines changed
Expand file tree Collapse file tree 10 files changed +18
-10
lines changed Original file line number Diff line number Diff line change @@ -31,14 +31,22 @@ def configure_metrics(settings: Settings):
3131 values .ValueClass = values .get_value_class ()
3232
3333
34+ async def try_remove (filename : str ):
35+ try :
36+ await remove (filename )
37+ except FileNotFoundError :
38+ pass
39+
40+
3441async def stop_metrics (settings : Settings , pid : int ):
3542 if not settings .parallel_workers :
3643 return
3744
3845 mark_process_dead (pid )
3946 pattern = os .path .join (settings .metrics_dir , f"*_{ pid } .db" )
4047 matching_files = glob .glob (pattern )
41- await asyncio .gather (* [remove (f ) for f in matching_files ])
48+ if len (matching_files ) > 0 :
49+ await asyncio .gather (* [try_remove (f ) for f in matching_files ])
4250
4351
4452class PrometheusEndpoint :
Original file line number Diff line number Diff line change 66 TF_USE_LEGACY_KERAS = 1
77allowlist_externals = poetry
88commands_pre =
9- poetry install -- sync --no-root
9+ poetry sync --no-root
1010 poetry install -C {toxinidir}/../../
1111commands =
1212 python -m pytest {posargs} -n auto \
Original file line number Diff line number Diff line change 66 TF_USE_LEGACY_KERAS = 1
77allowlist_externals = poetry
88commands_pre =
9- poetry install -- sync --no-root
9+ poetry sync --no-root
1010 poetry install -C {toxinidir}/../../
1111commands =
1212 python -m pytest {posargs} -n auto \
Original file line number Diff line number Diff line change @@ -4,7 +4,7 @@ isolated_build = true
44[testenv]
55allowlist_externals = poetry
66commands_pre =
7- poetry install -- sync --no-root
7+ poetry sync --no-root
88 poetry install -C {toxinidir}/../../
99commands =
1010 python -m pytest {posargs} -n auto \
Original file line number Diff line number Diff line change @@ -4,7 +4,7 @@ isolated_build = true
44[testenv]
55allowlist_externals = poetry
66commands_pre =
7- poetry install -- sync --no-root
7+ poetry sync --no-root
88 poetry install -C {toxinidir}/../../
99commands =
1010 python -m pytest {posargs} -n auto \
Original file line number Diff line number Diff line change @@ -4,7 +4,7 @@ isolated_build = true
44[testenv]
55allowlist_externals = poetry
66commands_pre =
7- poetry install -- sync --no-root
7+ poetry sync --no-root
88 poetry install -C {toxinidir}/../../
99commands =
1010 python -m pytest {posargs} -n auto \
Original file line number Diff line number Diff line change @@ -4,7 +4,7 @@ isolated_build = true
44[testenv]
55allowlist_externals = poetry
66commands_pre =
7- poetry install -- sync --no-root
7+ poetry sync --no-root
88 poetry install -C {toxinidir}/../../
99commands =
1010 python -m pytest {posargs} -n auto \
Original file line number Diff line number Diff line change @@ -4,7 +4,7 @@ isolated_build = true
44[testenv]
55allowlist_externals = poetry
66commands_pre =
7- poetry install -- sync --no-root
7+ poetry sync --no-root
88 poetry install -C {toxinidir}/../../
99commands =
1010 python -m pytest {posargs} -n auto \
Original file line number Diff line number Diff line change @@ -4,7 +4,7 @@ isolated_build = true
44[testenv]
55allowlist_externals = poetry
66commands_pre =
7- poetry install -- sync --no-root
7+ poetry sync --no-root
88 poetry install -C {toxinidir}/../../
99commands =
1010 python -m pytest {posargs} -n auto \
Original file line number Diff line number Diff line change @@ -4,7 +4,7 @@ isolated_build = true
44[testenv]
55allowlist_externals = poetry
66commands_pre =
7- poetry install -- sync --no-root
7+ poetry sync --no-root
88 poetry install -C {toxinidir}/../../
99commands =
1010 python -m pytest {posargs} -n auto \
You can’t perform that action at this time.
0 commit comments