clearTaskData

@param \QueueJitsu\Worker\AbstractWorker $worker
482493
public function clearTaskData(AbstractWorker $worker): void
    {
        $this->client->del([sprintf('worker:%s', $worker->getId())]);
    }
1352658
public function reset()
    {
        $this->debug('Emptying the worker database');
        $this->ResqueStatus->clearWorkers();
        $this->debug('Unregistering the scheduler worker');
        $this->ResqueStatus->unregisterSchedulerWorker();
        $this->output->outputLine('Fresque state has been reseted', 'success');
    }
209080
public function clear($entityName = null)
    {
        $this->unitOfWork->clear();

        $this->unitOfWork = new UnitOfWork($this);

        if ($this->eventManager->hasListeners(Events::onClear)) {
            $this->eventManager->dispatchEvent(Events::onClear, new Event\OnClearEventArgs($this));
        }
    }
262973
public function removeWorker($id)
    {
        if ($id instanceof Worker) {
            $id = $id->getId();
        }

        if (isset($this->waitingList[$id])) {
            unset($this->waitingList[$id]);
        }
        if (isset($this->workerList[$id])) {
            unset($this->workerList[$id]);
        }

        return $this;
    }
1187014
public function setTask(AbstractWorker $worker, $data): void
    {
        $key = sprintf('worker:%s', $worker->getId());

        $this->client->set($key, json_encode($data));
    }
143021
public function setTask(AbstractWorker $worker, $data): void
    {
        $this->adapter->setTask($worker, $data);
    }
566325
public function removeResource(AbstractResourceFile $resource) {
        if (parent::offsetExists($resource->getMemberId())) {
            parent::offsetUnset($resource->getMemberId());
        }
    }
1329111
def _clean(self):
        """"""
        if self._workers:
            for w in self._workers:
                if w.is_finished():
                    self._workers.remove(w)
        else:
            self._current_worker = None
            self._timer.stop()
45253
public void manage(Collection<SupervisedWorker> workers)
   {
      if(workers == null)
         return;
      
      this.workers.clear();
      
      SupervisedWorker worker = null;
      for (Iterator<SupervisedWorker> i = workers.iterator(); i.hasNext();)
      {
         worker = i.next();
         
         this.manage(worker);
      }
      
   }
647612
private void removeWorker(final Worker worker)
  {
    log.info("Kaboom! Worker[%s] removed!", worker.getHost());

    final ZkWorker zkWorker = zkWorkers.get(worker.getHost());
    if (zkWorker != null) {
      try {
        scheduleTasksCleanupForWorker(worker.getHost(), getAssignedTasks(worker));
      }
      catch (Exception e) {
        throw new RuntimeException(e);
      }
      finally {
        try {
          zkWorker.close();
        }
        catch (Exception e) {
          log.error(e, "Exception closing worker[%s]!", worker.getHost());
        }
        zkWorkers.remove(worker.getHost());
        checkBlackListedNodes();
      }
    }
    lazyWorkers.remove(worker.getHost());
  }
871255
public function cleanUp()
    {
        // create a separate queue for each priority
        foreach (PriorityKeys::getAll() as $priorityKey) {
            $this->workers[$this->uniqueWorkerName($priorityKey)]->stop();
        }
    }
411960
public function clear($namespace='default')
    {
        $cleared = false;

        if (isset($this->addedData[$namespace])) {
            $this->addedData[$namespace] = [];
            $cleared = true;
        }

        if (isset($this->cachedData[$namespace])) {
            $this->cachedData[$namespace] = [];
            $cleared = true;
        }

        if ($cleared) {
            $this->queryHits = [];
        }
    }
1188047
private void clear() {
		availableSlots.clear();
		allocatedSlots.clear();
		pendingRequests.clear();
		waitingForResourceManager.clear();
		registeredTaskManagers.clear();
	}
527961
public function removeWorker(Worker $worker)
    {
        $this->commander->runSync(new WorkerDelete($worker->getClient()), 5);
        $this->workerPool->remove($worker);
        // TODO
        // нужно запилить механизм перехвата невыполненных задач
        /*foreach ($this->tasks as $name => $workers) {
            if (isset($workers[$dsc])) {
                unset($this->tasks[$name][$dsc]);
            }
        }*/
    }
831505
private void cleanup(final String taskId)
  {
    if (!lifecycleLock.awaitStarted(1, TimeUnit.SECONDS)) {
      return;
    }
    final RemoteTaskRunnerWorkItem removed = completeTasks.remove(taskId);
    final Worker worker = removed.getWorker();
    if (removed == null || worker == null) {
      log.makeAlert("WTF?! Asked to cleanup nonexistent task")
         .addData("taskId", taskId)
         .emit();
    } else {
      final String workerId = worker.getHost();
      log.info("Cleaning up task[%s] on worker[%s]", taskId, workerId);
      final String statusPath = JOINER.join(indexerZkConfig.getStatusPath(), workerId, taskId);
      try {
        cf.delete().guaranteed().forPath(statusPath);
      }
      catch (KeeperException.NoNodeException e) {
        log.info("Tried to delete status path[%s] that didn't exist! Must've gone away already?", statusPath);
      }
      catch (Exception e) {
        throw new RuntimeException(e);
      }
    }
  }
952253
public function add(Worker $worker, AbstractThread $thread)
    {
        $this->threads[$thread->getId()] = $worker->getId();
        $this->workers[$worker->getId()][$thread->getId()] = $thread;
    }
758767
public function clearQueue($queue)
    {
        $this->getClient()->del($this->getKey(self::QUEUE_KEY . $queue));
    }