Clean the delay table

@return bool
331227
public function clean()
    {
        $delay = self::OUT_OF_SYNC_TIME_LIMIT;
        $query = $this->pdo->prepare(<<<SQL
DELETE FROM robotstxt__delay0
WHERE delayUntil < ((UNIX_TIMESTAMP() - :delay) * 1000000);
SQL
        );
        $query->bindValue('delay', $delay, \PDO::PARAM_INT);
        return $query->execute();
    }
1005415
public function flush()
    {
        $query = sprintf('TRUNCATE `%s`', $this->table);
        return $this->pdo->exec($query) !== false;
    }
1185791
public function cleanup()
  {
    // Has to be done, otherwise sqlite-file is locked on Windows-OS
    $this->PDO = null;
    $this->PreparedInsertStatement = null;

    unlink($this->sqlite_db_file);
  }
56296
public function cleanup()
    {
        $this->db->beginTransaction();

        // drop tables
        $rslt = $this->db->query( "SELECT tablename FROM pg_tables WHERE schemaname = 'public' AND tablename NOT LIKE 'pg_%'" );
        $rslt->setFetchMode( PDO::FETCH_NUM );
        $rows = $rslt->fetchAll();
        unset( $rslt );
        foreach ( $rows as $row )
        {
            $table = $row[0];
            $this->db->exec( "DROP TABLE $table" );
        }

        // drop sequences
        $rslt = $this->db->query( "SELECT relname FROM pg_catalog.pg_class WHERE relkind='S'" );
        $rslt->setFetchMode( PDO::FETCH_NUM );
        $rows = $rslt->fetchAll();
        foreach ( $rows as $row )
        {
            $seq = $row[0];
            $this->db->exec( "DROP SEQUENCE $seq" );
        }

        // FIXME: drop triggers?

        $this->db->commit();
    }
575047
private function cleanExpired()
    {
        // 10% chance to clean the database of expired sessions
        if (mt_rand(1, 10) == 1) {
            $expiredTime = $this->now - $this->secondsUntilExpiration;
            $stmt = $this->db->prepare("DELETE FROM {$this->tableName} WHERE time_updated < {$expiredTime}");
            $stmt->execute();
        }
    }
546273
public static function flushAll()
    {
        try {
            return static::getDb()->createCommand()->truncateTable(static::tableName())->execute();
        } catch (Exception $e) {
            if (YII_ENV_DEV) {
                throw $e;
            }
        }
    }
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()
58503
function clean(): Result {
    return $this->collectionBuilder()
      ->addTask($this->taskCleanDir('var'))
      ->addTask($this->taskDeleteDir(['build', 'doc/api', 'web']))
      ->run();
  }
873052
protected function flushValues()
	{
		// first, remove expired content from cache
		eaccelerator_gc();
		// now, remove leftover cache-keys
		$keys = eaccelerator_list_keys();
		foreach($keys as $key)
			$this->deleteValue(substr($key['name'], 1));
		return true;
	}
433881
public function flush()
    {
        $this->cache->flush();

        return $this->database->table($this->config['db_table'])->delete();
    }
602766
public function clean()
    {
        $instance = $this->replicate();
        $instance->setVisible([]);
        $instance->setHidden([]);
        $instance->setAppends([]);

        return $instance;
    }
1106284
public function flush()
    {
        if (file_exists($this->file)) {

            // We close the dba file before deleting
            // and reopen on next use.
            $this->__destruct();

            unlink($this->file);

            clearstatcache();

            return true;
        }

        return false;
    }
1125523
private function clean()
    {
        $this->mode       = null;
        $this->source     = null;
        $this->filters    = [];
        $this->targetSize = [];
    }
807968
protected function cleanupTempTables()
    {
        $dbHandle = $this->getDatabase()->getDatabaseConnection();

        $query = 'TRUNCATE ' . Database::TABLE_TMP_DEPENDS_NEEDED;
        $dbHandle->query($query);
    }
1206082
public function clear()
    {
        $this->_data                 = array();
        $this->__modified_properties = array();
        $this->setStatus(NULL);

        if ($this->isConnected()) {
            $this->_data = $this->getTable()->getDefaults();
        }

        return $this;
    }
376590
protected function cleanPosition()
    {
        $modulesType = [];

        $this->moduleQuery->clear();
        $modules = $this->moduleQuery->orderByPosition(Criteria::ASC);

        /** @var \Thelia\Model\Module $module */
        foreach ($modules as $module) {
            if (!isset($modulesType[$module->getType()])) {
                $modulesType[$module->getType()] = 0;
            }

            $module
                ->setPosition(++$modulesType[$module->getType()])
                ->save()
            ;
        }

        return $modulesType;
    }
153740
public function actionCleanup()
    {
        $tagIds = Tag::find()->select(['id'])->column();

        $batch = TagRelation::find()->batch();
        $i = 0;
        $delete = 0;
        foreach ($batch as $rows) {
            foreach ($rows as $relation) {
                $i++;
                // check if tag id exists in table
                if (!in_array($relation->tag_id, $tagIds)) {
                    $relation->delete();
                    $delete++;
                    continue;
                }

                $prefixedTableName = '{{%'.$relation->table_name.'}}';
                $pk = $this->tableSchema($prefixedTableName)->primaryKey;
                $query = (new Query())
                    ->from($prefixedTableName)
                    ->where([current($pk) => $relation->pk_id]) // provide model mapping or read pk name from schema
                    ->exists();

                if (!$query) {
                    $relation->delete();
                    $delete++;
                }

                unset($relation, $prefixedTableName, $pk, $query);
            }
        }

        return $this->outputSuccess("{$i} items checked and {$delete} items deleted.");
    }