grr/server/grr_response_server/hunt.py
def UpdateHunt(hunt_id, client_limit=None, client_rate=None, expiry_time=None):
  """Updates a hunt (it must be paused to be updated)."""

  def UpdateFn(hunt_obj):
    """Update callback used by UpdateHuntObject."""

    if hunt_obj.hunt_state != hunt_obj.HuntState.PAUSED:
      raise OnlyPausedHuntCanBeModifiedError(hunt_obj)

    if client_limit is not None:
      hunt_obj.client_limit = client_limit

    if client_rate is not None:
      hunt_obj.client_rate = client_rate

    if expiry_time is not None:
      hunt_obj.expiry_time = expiry_time

    return hunt_obj

  return data_store.REL_DB.UpdateHuntObject(hunt_id, UpdateFn)
Updates a hunt (it must be paused to be updated).
Updates a hunt (it must be paused to be updated).
Updates a hunt ( it must be paused to be updated ) .
def UpdateHunt(hunt_id, client_limit=None, client_rate=None, expiry_time=None):
  def UpdateFn(hunt_obj):
    if hunt_obj.hunt_state != hunt_obj.HuntState.PAUSED:
      raise OnlyPausedHuntCanBeModifiedError(hunt_obj)
    if client_limit is not None:
      hunt_obj.client_limit = client_limit
    if client_rate is not None:
      hunt_obj.client_rate = client_rate
    if expiry_time is not None:
      hunt_obj.expiry_time = expiry_time
    return hunt_obj
  return data_store.REL_DB.UpdateHuntObject(hunt_id, UpdateFn)
def UpdateHunt ( hunt_id , client_limit = None , client_rate = None , expiry_time = None ) : def UpdateFn ( hunt_obj ) : """Update callback used by UpdateHuntObject.""" if hunt_obj . hunt_state != hunt_obj . HuntState . PAUSED : raise OnlyPausedHuntCanBeModifiedError ( hunt_obj ) if client_limit is not None : hunt_obj . client_limit = client_limit if client_rate is not None : hunt_obj . client_rate = client_rate if expiry_time is not None : hunt_obj . expiry_time = expiry_time return hunt_obj return data_store . REL_DB . UpdateHuntObject ( hunt_id , UpdateFn )
Updates a hunt (it must be paused to be updated).
Updates a hunt ( it must be paused to be updated ) .
"""Updates a hunt (it must be paused to be updated).""" """Update callback used by UpdateHuntObject."""
hunt_id
client_limit
client_rate
expiry_time