Skip to content

Commit f792b6a

Browse files
committed
Avoid constant reinitialization of the requester.
We now do it once when the worker spawns.
1 parent 443bdcd commit f792b6a

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

PyFunceble/cli/processes/workers/base.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -277,6 +277,9 @@ def break_now() -> bool:
277277
PyFunceble.cli.facility.CredentialLoader.start()
278278
PyFunceble.cli.factory.DBSession.init_db_sessions()
279279

280+
# Be sure that all settings are loaded proprely!!
281+
PyFunceble.factory.Requester.guess_all_settings()
282+
280283
wait_for_stop = (
281284
bool(PyFunceble.storage.CONFIGURATION.cli_testing.mining) is True
282285
)

PyFunceble/cli/processes/workers/miner.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -82,9 +82,6 @@ class MinerWorker(WorkerBase):
8282
url2netloc: Optional[Url2Netloc] = None
8383

8484
def __post_init__(self) -> None:
85-
# Be sure that all settings are loaded proprely!!
86-
PyFunceble.factory.Requester.guess_all_settings()
87-
8885
self.url2netloc = Url2Netloc()
8986

9087
return super().__post_init__()

0 commit comments

Comments
 (0)