From 11c7535e00350403bb9cfe718c71c9bffabd392f Mon Sep 17 00:00:00 2001 From: satackey <21271711+satackey@users.noreply.github.com> Date: Wed, 5 Aug 2020 16:43:14 +0900 Subject: [PATCH] delete --- src/LayerCache.ts | 18 ------------------ 1 file changed, 18 deletions(-) diff --git a/src/LayerCache.ts b/src/LayerCache.ts index a1a75e8d..5251ef68 100644 --- a/src/LayerCache.ts +++ b/src/LayerCache.ts @@ -9,20 +9,6 @@ import { assertManifests, Manifest, Manifests } from './Tar' import format from 'string-format' import PromisePool from 'native-promise-pool' -type ReturnPromiseFunc = (arg: any) => Promise - -const createPromiseProducerFromArray = (array: T[], callBackFunc: ((t: T) => Promise)) => { - const currentIndex = 0; - - return () => callBackFunc(array[currentIndex]) -} - -const generatePromise = function * (array: T1[], callbackFunc: ((t: T1) => Promise)) { - for (let i = 0; i < array.length; i++) { - yield callbackFunc(array[i]) - } -} - class LayerCache { // repotag: string ids: string[] @@ -198,10 +184,6 @@ class LayerCache { } private async restoreLayers() { - const restoring = (await this.getLayerIds()).map(layerId => this.restoreSingleLayerBy(layerId)); - - const promiseIter = generatePromise(await this.getLayerIds(), layerId => this.restoreSingleLayerBy(layerId)) - const pool = new PromisePool(this.concurrency) const restoredLayerKeysThatMayContainUndefined = await Promise.all(