grr/server/grr_response_server/databases/mem_clients.py
def DeleteOldClientStats(
      self, yield_after_count,
      retention_time):
    """Deletes ClientStats older than a given timestamp."""
    deleted_count = 0
    yielded = False

    for stats_dict in itervalues(self.client_stats):
      for timestamp in list(stats_dict.keys()):
        if timestamp < retention_time:
          del stats_dict[timestamp]
          deleted_count += 1

          if deleted_count >= yield_after_count:
            yield deleted_count
            yielded = True
            deleted_count = 0

    if deleted_count > 0 or not yielded:
      yield deleted_count
Deletes ClientStats older than a given timestamp.
Deletes ClientStats older than a given timestamp.
Deletes ClientStats older than a given timestamp .
def DeleteOldClientStats(
      self, yield_after_count,
      retention_time):
    deleted_count = 0
    yielded = False
    for stats_dict in itervalues(self.client_stats):
      for timestamp in list(stats_dict.keys()):
        if timestamp < retention_time:
          del stats_dict[timestamp]
          deleted_count += 1
          if deleted_count >= yield_after_count:
            yield deleted_count
            yielded = True
            deleted_count = 0
    if deleted_count > 0 or not yielded:
      yield deleted_count
def DeleteOldClientStats ( self , yield_after_count , retention_time ) : deleted_count = 0 yielded = False for stats_dict in itervalues ( self . client_stats ) : for timestamp in list ( stats_dict . keys ( ) ) : if timestamp < retention_time : del stats_dict [ timestamp ] deleted_count += 1 if deleted_count >= yield_after_count : yield deleted_count yielded = True deleted_count = 0 if deleted_count > 0 or not yielded : yield deleted_count
Deletes ClientStats older than a given timestamp.
Deletes ClientStats older than a given timestamp .
"""Deletes ClientStats older than a given timestamp."""
self
yield_after_count
retention_time