Revert "fix(database): db auth default retry 30 times"

This reverts commit 283f1d6000.
This commit is contained in:
chenos 2024-06-19 21:36:06 +08:00
parent 5ad3a854c5
commit 95666a97df

View File

@ -15,9 +15,9 @@ import { EventEmitter } from 'events';
import { backOff } from 'exponential-backoff'; import { backOff } from 'exponential-backoff';
import glob from 'glob'; import glob from 'glob';
import lodash from 'lodash'; import lodash from 'lodash';
import safeJsonStringify from 'safe-json-stringify';
import { nanoid } from 'nanoid'; import { nanoid } from 'nanoid';
import { basename, isAbsolute, resolve } from 'path'; import { basename, isAbsolute, resolve } from 'path';
import safeJsonStringify from 'safe-json-stringify';
import semver from 'semver'; import semver from 'semver';
import { import {
DataTypes, DataTypes,
@ -45,8 +45,6 @@ import { Field, FieldContext, RelationField } from './fields';
import { checkDatabaseVersion } from './helpers'; import { checkDatabaseVersion } from './helpers';
import { InheritedCollection } from './inherited-collection'; import { InheritedCollection } from './inherited-collection';
import InheritanceMap from './inherited-map'; import InheritanceMap from './inherited-map';
import { InterfaceManager } from './interface-manager';
import { registerInterfaces } from './interfaces/utils';
import { registerBuiltInListeners } from './listeners'; import { registerBuiltInListeners } from './listeners';
import { MigrationItem, Migrations } from './migration'; import { MigrationItem, Migrations } from './migration';
import { Model } from './model'; import { Model } from './model';
@ -86,6 +84,8 @@ import {
import { patchSequelizeQueryInterface, snakeCase } from './utils'; import { patchSequelizeQueryInterface, snakeCase } from './utils';
import { BaseValueParser, registerFieldValueParsers } from './value-parsers'; import { BaseValueParser, registerFieldValueParsers } from './value-parsers';
import { ViewCollection } from './view-collection'; import { ViewCollection } from './view-collection';
import { InterfaceManager } from './interface-manager';
import { registerInterfaces } from './interfaces/utils';
export type MergeOptions = merge.Options; export type MergeOptions = merge.Options;
@ -811,7 +811,7 @@ export class Database extends EventEmitter implements AsyncEmitter {
/* istanbul ignore next -- @preserve */ /* istanbul ignore next -- @preserve */
async auth(options: Omit<QueryOptions, 'retry'> & { retry?: number | Pick<QueryOptions, 'retry'> } = {}) { async auth(options: Omit<QueryOptions, 'retry'> & { retry?: number | Pick<QueryOptions, 'retry'> } = {}) {
const { retry = 30, ...others } = options; const { retry = 5, ...others } = options;
const startingDelay = 50; const startingDelay = 50;
const timeMultiple = 2; const timeMultiple = 2;