File tree Expand file tree Collapse file tree 2 files changed +7
-2
lines changed Expand file tree Collapse file tree 2 files changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -171,8 +171,9 @@ async def _get_authenticated_community_if_possible(config, logger):
171
171
if not community_auth .is_initialized ():
172
172
# try with saved credentials if any
173
173
has_tentacles = tentacles_manager_api .is_tentacles_architecture_valid ()
174
- # When no tentacles, fetch private data. Otherwise fetch it later on in bot init
175
- await community_auth .async_init_account (fetch_private_data = not has_tentacles )
174
+ # When no tentacles or in cloud, fetch private data. Otherwise fetch it later on in bot init
175
+ fetch_private_data = not has_tentacles or constants .IS_CLOUD_ENV
176
+ await community_auth .async_init_account (fetch_private_data = fetch_private_data )
176
177
except authentication .FailedAuthentication as err :
177
178
logger .error (f"Failed authentication when initializing community authenticator: { err } " )
178
179
except Exception as err :
Original file line number Diff line number Diff line change @@ -555,12 +555,15 @@ async def fetch_private_data(self, reset=False):
555
555
except Exception as err :
556
556
self .logger .exception (err , True , f"Unexpected error when fetching package urls: { err } " )
557
557
finally :
558
+ if self ._fetched_private_data is None :
559
+ self ._fetched_private_data = asyncio .Event ()
558
560
self ._fetched_private_data .set ()
559
561
if self .has_open_source_package ():
560
562
# fetch indexes as well
561
563
await self ._refresh_products ()
562
564
563
565
async def _fetch_package_urls (self , mqtt_uuid : typing .Optional [str ]) -> (list [str ], str ):
566
+ self .logger .debug (f"Fetching package" )
564
567
resp = await self .supabase_client .http_get (
565
568
constants .COMMUNITY_EXTENSIONS_CHECK_ENDPOINT ,
566
569
headers = {
@@ -570,6 +573,7 @@ async def _fetch_package_urls(self, mqtt_uuid: typing.Optional[str]) -> (list[st
570
573
params = {"mqtt_id" : mqtt_uuid } if mqtt_uuid else {},
571
574
timeout = constants .COMMUNITY_FETCH_TIMEOUT
572
575
)
576
+ self .logger .debug ("Fetched package" )
573
577
resp .raise_for_status ()
574
578
json_resp = json .loads (resp .json ().get ("message" , {}))
575
579
if not json_resp :
You can’t perform that action at this time.
0 commit comments