From 709756b8e183f67ef9bf8f7bc149af4736260350 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Fri, 7 Jul 2017 16:57:28 +0200 Subject: Async signature and various fixes --- server/initializers/constants.ts | 7 ++++++- server/initializers/migrator.ts | 4 +--- 2 files changed, 7 insertions(+), 4 deletions(-) (limited to 'server/initializers') diff --git a/server/initializers/constants.ts b/server/initializers/constants.ts index bf99f4df6..2792d3228 100644 --- a/server/initializers/constants.ts +++ b/server/initializers/constants.ts @@ -287,6 +287,10 @@ const USER_ROLES: { [ id: string ]: UserRole } = { // --------------------------------------------------------------------------- +const OPENGRAPH_COMMENT = '' + +// --------------------------------------------------------------------------- + // Special constants for a test instance if (isTestInstance() === true) { CONSTRAINTS_FIELDS.VIDEOS.DURATION.max = 14 @@ -306,12 +310,13 @@ export { CONFIG, CONSTRAINTS_FIELDS, FRIEND_SCORE, - JOBS_FETCHING_INTERVAL, JOB_STATES, JOBS_CONCURRENCY, JOBS_FETCH_LIMIT_PER_CYCLE, + JOBS_FETCHING_INTERVAL, LAST_MIGRATION_VERSION, OAUTH_LIFETIME, + OPENGRAPH_COMMENT, PAGINATION_COUNT_DEFAULT, PODS_SCORE, PREVIEWS_SIZE, diff --git a/server/initializers/migrator.ts b/server/initializers/migrator.ts index d381551b5..3184ec920 100644 --- a/server/initializers/migrator.ts +++ b/server/initializers/migrator.ts @@ -35,9 +35,7 @@ function migrate () { return getMigrationScripts().then(migrationScripts => ({ actualVersion, migrationScripts })) }) .then(({ actualVersion, migrationScripts }) => { - return Promise.mapSeries(migrationScripts, entity => { - return executeMigration(actualVersion, entity) - }) + return Promise.each(migrationScripts, entity => executeMigration(actualVersion, entity)) }) .then(() => { logger.info('Migrations finished. New migration version schema: %s', LAST_MIGRATION_VERSION) -- cgit v1.2.3