diff options
author | Chocobozzz <me@florianbigard.com> | 2021-08-27 14:32:44 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2021-08-27 15:12:22 +0200 |
commit | 41fb13c330de629df2d23379209e79c7af0f2e9a (patch) | |
tree | 73bc5a90566406b3910f142beae2a879c1e4265d /server/models/model-cache.ts | |
parent | 40e7ed0714f96c01e16de3ac971a4b28116294e1 (diff) | |
download | PeerTube-41fb13c330de629df2d23379209e79c7af0f2e9a.tar.gz PeerTube-41fb13c330de629df2d23379209e79c7af0f2e9a.tar.zst PeerTube-41fb13c330de629df2d23379209e79c7af0f2e9a.zip |
esModuleInterop to true
Diffstat (limited to 'server/models/model-cache.ts')
-rw-r--r-- | server/models/model-cache.ts | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/server/models/model-cache.ts b/server/models/model-cache.ts index eafb5c13c..3651267e7 100644 --- a/server/models/model-cache.ts +++ b/server/models/model-cache.ts | |||
@@ -1,5 +1,4 @@ | |||
1 | import { Model } from 'sequelize-typescript' | 1 | import { Model } from 'sequelize-typescript' |
2 | import * as Bluebird from 'bluebird' | ||
3 | import { logger } from '@server/helpers/logger' | 2 | import { logger } from '@server/helpers/logger' |
4 | 3 | ||
5 | type ModelCacheType = | 4 | type ModelCacheType = |
@@ -52,7 +51,7 @@ class ModelCache { | |||
52 | 51 | ||
53 | if (cache.has(key)) { | 52 | if (cache.has(key)) { |
54 | logger.debug('Model cache hit for %s -> %s.', cacheType, key) | 53 | logger.debug('Model cache hit for %s -> %s.', cacheType, key) |
55 | return Bluebird.resolve<T>(cache.get(key)) | 54 | return Promise.resolve<T>(cache.get(key)) |
56 | } | 55 | } |
57 | 56 | ||
58 | return fun().then(m => { | 57 | return fun().then(m => { |