Skip to content

Commit 19ea5c7

Browse files
committed
Update init regarding the implicit config finalization
1 parent c4b5d48 commit 19ea5c7

File tree

1 file changed

+1
-10
lines changed

1 file changed

+1
-10
lines changed

src/apify/_actor.py

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -282,16 +282,7 @@ async def init(self) -> None:
282282
# Set explicitly the configuration in the service locator
283283
service_locator.set_configuration(self.configuration)
284284
else:
285-
try:
286-
# Set implicit default Apify configuration, unless configuration was already set.
287-
service_locator.set_configuration(Configuration())
288-
except ServiceConflictError:
289-
self.log.info(
290-
'Configuration in service locator was set explicitly before Actor.init was called.'
291-
'Using the existing configuration.'
292-
)
293-
# Use the configuration from the service locator
294-
self._configuration = Configuration.get_global_configuration()
285+
self._finalize_implicit_configuration()
295286

296287
if self._is_initialized:
297288
raise RuntimeError('The Actor was already initialized!')

0 commit comments

Comments
 (0)