parameters: (self)
docstring: Execute the task.
docstring_summary: Execute the task.
docstring_tokens: Execute the task .
function: async def async_execute(self) -> None:
          """Execute the task."""
          if not self.hacs.queue.has_pending_tasks:
              self.task_logger(self.hacs.log.debug, "Nothing in the queue")
              return
          if self.hacs.queue.running:
              self.task_logger(self.hacs.log.debug, "Queue is already running")
              return
  
          can_update = await self.hacs.async_can_update()
          self.task_logger(
              self.hacs.log.debug,
              f"Can update {can_update} repositories, items in queue {self.hacs.queue.pending_tasks}",
          )
          if can_update != 0:
              self.hacs.status.background_task = True
              self.hass.bus.async_fire("hacs/status", {})
              try:
                  await self.hacs.queue.execute(can_update)
              except HacsExecutionStillInProgress:
                  pass
              self.hacs.status.background_task = False
              self.hass.bus.async_fire("hacs/status", {})
function_tokens: async def async_execute ( self ) -> None : if not self . hacs . queue . has_pending_tasks : self . task_logger ( self . hacs . log . debug , "Nothing in the queue" ) return if self . hacs . queue . running : self . task_logger ( self . hacs . log . debug , "Queue is already running" ) return can_update = await self . hacs . async_can_update ( ) self . task_logger ( self . hacs . log . debug , f"Can update {can_update} repositories, items in queue {self.hacs.queue.pending_tasks}" , ) if can_update != 0 : self . hacs . status . background_task = True self . hass . bus . async_fire ( "hacs/status" , { } ) try : await self . hacs . queue . execute ( can_update ) except HacsExecutionStillInProgress : pass self . hacs . status . background_task = False self . hass . bus . async_fire ( "hacs/status" , { } )