parameters: (self, job, latest_inventory_update)
return_statement: return False
docstring: If there's already a inventory update utilizing this job that's about to run
          then we don't need to create one
docstring_summary: If there's already a inventory update utilizing this job that's about to run
          then we don't need to create one
docstring_tokens: If there s already a inventory update utilizing this job that s about to run then we don t need to create one
function: def should_update_inventory_source(self, job, latest_inventory_update):
          now = tz_now()
  
          if latest_inventory_update is None:
              return True
          '''
          If there's already a inventory update utilizing this job that's about to run
          then we don't need to create one
          '''
          if latest_inventory_update.status in ['waiting', 'pending', 'running']:
              return False
  
          timeout_seconds = timedelta(seconds=latest_inventory_update.inventory_source.update_cache_timeout)
          if (latest_inventory_update.finished + timeout_seconds) < now:
              return True
          if latest_inventory_update.inventory_source.update_on_launch is True and latest_inventory_update.status in ['failed', 'canceled', 'error']:
              return True
          return False
function_tokens: def should_update_inventory_source ( self , job , latest_inventory_update ) : now = tz_now ( ) if latest_inventory_update is None : return True if latest_inventory_update . status in [ 'waiting' , 'pending' , 'running' ] : return False timeout_seconds = timedelta ( seconds = latest_inventory_update . inventory_source . update_cache_timeout ) if ( latest_inventory_update . finished + timeout_seconds ) < now : return True if latest_inventory_update . inventory_source . update_on_launch is True and latest_inventory_update . status in [ 'failed' , 'canceled' , 'error' ] : return True return False