aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/models/model-cache.ts
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2021-08-27 14:32:44 +0200
committerChocobozzz <me@florianbigard.com>2021-08-27 15:12:22 +0200
commit41fb13c330de629df2d23379209e79c7af0f2e9a (patch)
tree73bc5a90566406b3910f142beae2a879c1e4265d /server/models/model-cache.ts
parent40e7ed0714f96c01e16de3ac971a4b28116294e1 (diff)
downloadPeerTube-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.ts3
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 @@
1import { Model } from 'sequelize-typescript' 1import { Model } from 'sequelize-typescript'
2import * as Bluebird from 'bluebird'
3import { logger } from '@server/helpers/logger' 2import { logger } from '@server/helpers/logger'
4 3
5type ModelCacheType = 4type 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 => {