mirror of
				https://github.com/Unleash/unleash.git
				synced 2025-10-27 11:02:16 +01:00 
			
		
		
		
	chore: set proxy-repo interval to 45mins instead of 20secs (#6340)
Since we're polling for updates to max revision id every second, and listening for update events for revision id in the proxy repository then running a refresh interval of 20secs in the proxy repo refresh seems excessive. This PR changes the frequency of the refresh to once per 45mins.
This commit is contained in:
		
							parent
							
								
									91c08593a6
								
							
						
					
					
						commit
						f351ad821b
					
				| @ -148,7 +148,7 @@ exports[`should create default config 1`] = ` | |||||||
|     }, |     }, | ||||||
|   }, |   }, | ||||||
|   "frontendApi": { |   "frontendApi": { | ||||||
|     "refreshIntervalInMs": 20000, |     "refreshIntervalInMs": 2700000, | ||||||
|   }, |   }, | ||||||
|   "frontendApiOrigins": [ |   "frontendApiOrigins": [ | ||||||
|     "*", |     "*", | ||||||
|  | |||||||
| @ -24,7 +24,11 @@ import { | |||||||
| import { getDefaultLogProvider, LogLevel, validateLogProvider } from './logger'; | import { getDefaultLogProvider, LogLevel, validateLogProvider } from './logger'; | ||||||
| import { defaultCustomAuthDenyAll } from './default-custom-auth-deny-all'; | import { defaultCustomAuthDenyAll } from './default-custom-auth-deny-all'; | ||||||
| import { formatBaseUri } from './util/format-base-uri'; | import { formatBaseUri } from './util/format-base-uri'; | ||||||
| import { hoursToMilliseconds, secondsToMilliseconds } from 'date-fns'; | import { | ||||||
|  |     hoursToMilliseconds, | ||||||
|  |     minutesToMilliseconds, | ||||||
|  |     secondsToMilliseconds, | ||||||
|  | } from 'date-fns'; | ||||||
| import EventEmitter from 'events'; | import EventEmitter from 'events'; | ||||||
| import { | import { | ||||||
|     ApiTokenType, |     ApiTokenType, | ||||||
| @ -514,7 +518,7 @@ export function createConfig(options: IUnleashOptions): IUnleashConfig { | |||||||
|     const frontendApi = options.frontendApi || { |     const frontendApi = options.frontendApi || { | ||||||
|         refreshIntervalInMs: parseEnvVarNumber( |         refreshIntervalInMs: parseEnvVarNumber( | ||||||
|             process.env.FRONTEND_API_REFRESH_INTERVAL_MS, |             process.env.FRONTEND_API_REFRESH_INTERVAL_MS, | ||||||
|             20000, |             minutesToMilliseconds(45), | ||||||
|         ), |         ), | ||||||
|     }; |     }; | ||||||
| 
 | 
 | ||||||
|  | |||||||
		Loading…
	
		Reference in New Issue
	
	Block a user