diff options
author | Chocobozzz <me@florianbigard.com> | 2019-03-19 14:23:17 +0100 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2019-03-19 14:30:43 +0100 |
commit | d74d29ad9e35929491cf37223398d2535ab23de0 (patch) | |
tree | 2812c9acbc05be0603eb671f8e6bd81086cf84d5 /server/initializers/installer.ts | |
parent | 9f79ade627f0044606a9fbbe16ca0154661d12b9 (diff) | |
download | PeerTube-d74d29ad9e35929491cf37223398d2535ab23de0.tar.gz PeerTube-d74d29ad9e35929491cf37223398d2535ab23de0.tar.zst PeerTube-d74d29ad9e35929491cf37223398d2535ab23de0.zip |
Limit user tokens cache
Diffstat (limited to 'server/initializers/installer.ts')
-rw-r--r-- | server/initializers/installer.ts | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/server/initializers/installer.ts b/server/initializers/installer.ts index cd2c942fd..07af96b68 100644 --- a/server/initializers/installer.ts +++ b/server/initializers/installer.ts | |||
@@ -6,7 +6,7 @@ import { UserModel } from '../models/account/user' | |||
6 | import { ApplicationModel } from '../models/application/application' | 6 | import { ApplicationModel } from '../models/application/application' |
7 | import { OAuthClientModel } from '../models/oauth/oauth-client' | 7 | import { OAuthClientModel } from '../models/oauth/oauth-client' |
8 | import { applicationExist, clientsExist, usersExist } from './checker-after-init' | 8 | import { applicationExist, clientsExist, usersExist } from './checker-after-init' |
9 | import { CACHE, CONFIG, HLS_STREAMING_PLAYLIST_DIRECTORY, LAST_MIGRATION_VERSION } from './constants' | 9 | import { FILES_CACHE, CONFIG, HLS_STREAMING_PLAYLIST_DIRECTORY, LAST_MIGRATION_VERSION } from './constants' |
10 | import { sequelizeTypescript } from './database' | 10 | import { sequelizeTypescript } from './database' |
11 | import { remove, ensureDir } from 'fs-extra' | 11 | import { remove, ensureDir } from 'fs-extra' |
12 | 12 | ||
@@ -42,8 +42,8 @@ export { | |||
42 | // --------------------------------------------------------------------------- | 42 | // --------------------------------------------------------------------------- |
43 | 43 | ||
44 | function removeCacheAndTmpDirectories () { | 44 | function removeCacheAndTmpDirectories () { |
45 | const cacheDirectories = Object.keys(CACHE) | 45 | const cacheDirectories = Object.keys(FILES_CACHE) |
46 | .map(k => CACHE[k].DIRECTORY) | 46 | .map(k => FILES_CACHE[k].DIRECTORY) |
47 | 47 | ||
48 | const tasks: Promise<any>[] = [] | 48 | const tasks: Promise<any>[] = [] |
49 | 49 | ||
@@ -60,8 +60,8 @@ function removeCacheAndTmpDirectories () { | |||
60 | 60 | ||
61 | function createDirectoriesIfNotExist () { | 61 | function createDirectoriesIfNotExist () { |
62 | const storage = CONFIG.STORAGE | 62 | const storage = CONFIG.STORAGE |
63 | const cacheDirectories = Object.keys(CACHE) | 63 | const cacheDirectories = Object.keys(FILES_CACHE) |
64 | .map(k => CACHE[k].DIRECTORY) | 64 | .map(k => FILES_CACHE[k].DIRECTORY) |
65 | 65 | ||
66 | const tasks: Promise<void>[] = [] | 66 | const tasks: Promise<void>[] = [] |
67 | for (const key of Object.keys(storage)) { | 67 | for (const key of Object.keys(storage)) { |