Skip to content

Commit

Permalink
machine: dont allow usb id request to block initialization
Browse files Browse the repository at this point in the history
Signed-off-by:  Eric Callahan <[email protected]>
  • Loading branch information
Arksine committed Jan 24, 2024
1 parent 83fdc5c commit b61015f
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion moonraker/components/machine.py
Original file line number Diff line number Diff line change
Expand Up @@ -284,7 +284,8 @@ async def wait_for_init(
pass

async def component_init(self) -> None:
await self.update_usb_ids()
eventloop = self.server.get_event_loop()
eventloop.create_task(self.update_usb_ids())
await self.validator.validation_init()
await self.sys_provider.initialize()
if not self.inside_container:
Expand Down Expand Up @@ -849,6 +850,7 @@ async def update_usb_ids(self, force: bool = False) -> None:
headers["If-None-Match"] = etag
if last_modified is not None and usb_ids_path.is_file():
headers["If-Modified-Since"] = last_modified
logging.info("Fetching latest usb.ids file...")
resp = await client.get(
USB_IDS_URL, headers, enable_cache=False
)
Expand Down

0 comments on commit b61015f

Please sign in to comment.