'Create a new GRRClientWorker.'

def __init__(self, client=None):

    super(GRRClientWorker, self).__init__()
    self.client = client
    self._in_queue = []
    self._out_queue = []
    self._out_queue_size = 0
    self._is_active = False
    self._send_stats_on_check = False
    self.last_stats_sent_time = None
    self.proc = psutil.Process(os.getpid())
    self.nanny_controller = client_utils.NannyController()
    self.nanny_controller.StartNanny()
    if (not GRRClientWorker.stats_collector):
        GRRClientWorker.stats_collector = client_stats.ClientStatsCollector(self)
        GRRClientWorker.stats_collector.start()
    self.lock = threading.RLock()
    self.http_manager = HTTPManager(heart_beat_cb=self.nanny_controller.Heartbeat)
