parameters: (
              self,
              timeout_seconds: typing.Optional[int] = 5
      )
return_statement: return available
docstring: Use the harvesting worker to check if the remote service is available
docstring_summary: Use the harvesting worker to check if the remote service is available
docstring_tokens: Use the harvesting worker to check if the remote service is available
function: def update_availability(
              self,
              timeout_seconds: typing.Optional[int] = 5
      ):
          """Use the harvesting worker to check if the remote service is available"""
          worker = self.get_harvester_worker()
          self.last_checked_availability = timezone.now()
          available = worker.check_availability(timeout_seconds=timeout_seconds)
          self.remote_available = available
          self.save()
          return available
function_tokens: def update_availability ( self , timeout_seconds : typing . Optional [ int ] = 5 ) : worker = self . get_harvester_worker ( ) self . last_checked_availability = timezone . now ( ) available = worker . check_availability ( timeout_seconds = timeout_seconds ) self . remote_available = available self . save ( ) return available