Skip to content

Commit 11c7535

Browse files
committed
delete
1 parent d8194ff commit 11c7535

File tree

1 file changed

+0
-18
lines changed

1 file changed

+0
-18
lines changed

src/LayerCache.ts

-18
Original file line numberDiff line numberDiff line change
@@ -9,20 +9,6 @@ import { assertManifests, Manifest, Manifests } from './Tar'
99
import format from 'string-format'
1010
import PromisePool from 'native-promise-pool'
1111

12-
type ReturnPromiseFunc = <T>(arg: any) => Promise<T[]>
13-
14-
const createPromiseProducerFromArray = <T, T2>(array: T[], callBackFunc: ((t: T) => Promise<T2>)) => {
15-
const currentIndex = 0;
16-
17-
return () => callBackFunc(array[currentIndex])
18-
}
19-
20-
const generatePromise = function * <T1, T2>(array: T1[], callbackFunc: ((t: T1) => Promise<T2>)) {
21-
for (let i = 0; i < array.length; i++) {
22-
yield callbackFunc(array[i])
23-
}
24-
}
25-
2612
class LayerCache {
2713
// repotag: string
2814
ids: string[]
@@ -198,10 +184,6 @@ class LayerCache {
198184
}
199185

200186
private async restoreLayers() {
201-
const restoring = (await this.getLayerIds()).map(layerId => this.restoreSingleLayerBy(layerId));
202-
203-
const promiseIter = generatePromise(await this.getLayerIds(), layerId => this.restoreSingleLayerBy(layerId))
204-
205187
const pool = new PromisePool(this.concurrency)
206188

207189
const restoredLayerKeysThatMayContainUndefined = await Promise.all(

0 commit comments

Comments
 (0)