Skip to content

Commit

Permalink
Scheduler: rename connectio n variables matching to other services
Browse files Browse the repository at this point in the history
  • Loading branch information
georg-schwarz committed Aug 18, 2020
1 parent 59c4a19 commit 0b2fd56
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions docker-compose.yml
Expand Up @@ -56,8 +56,8 @@ services:
environment:
MAX_TRIGGER_RETRIES: 2
ADAPTER_SERVICE_URL: http://adapter:8080
INITIAL_CONNECTION_RETRIES: 20
INITIAL_CONNECTION_RETRY_BACKOFF: 5000
CONNECTION_RETRIES: 20
CONNECTION_BACKOFF_IN_MS: 5000
build:
context: ./scheduler/
labels:
Expand Down
4 changes: 2 additions & 2 deletions scheduler/src/env.ts
Expand Up @@ -13,6 +13,6 @@ const getEnv = (envName: string): string => {
}

export const MAX_TRIGGER_RETRIES = +getEnv('MAX_TRIGGER_RETRIES')
export const INITIAL_CONNECTION_RETRIES = +getEnv('INITIAL_CONNECTION_RETRIES')
export const INITIAL_CONNECTION_RETRY_BACKOFF = +getEnv('INITIAL_CONNECTION_RETRY_BACKOFF')
export const CONNECTION_RETRIES = +getEnv('CONNECTION_RETRIES')
export const CONNECTION_BACKOFF_IN_MS = +getEnv('CONNECTION_BACKOFF_IN_MS')
export const ADAPTER_SERVICE_URL = getEnv('ADAPTER_SERVICE_URL')
6 changes: 3 additions & 3 deletions scheduler/src/index.ts
Expand Up @@ -5,8 +5,8 @@ import schedule from 'node-schedule'
import * as Scheduling from './scheduling'

import {
INITIAL_CONNECTION_RETRIES,
INITIAL_CONNECTION_RETRY_BACKOFF
CONNECTION_RETRIES,
CONNECTION_BACKOFF_IN_MS
}
from './env'

Expand All @@ -18,7 +18,7 @@ const API_VERSION = '0.0.1'
const CHRONJOB_EVERY_2_SECONDS = '*/2 * * * * *'

const server = app.listen(port, async () => {
await initJobs(INITIAL_CONNECTION_RETRIES, INITIAL_CONNECTION_RETRY_BACKOFF)
await initJobs(CONNECTION_RETRIES, CONNECTION_BACKOFF_IN_MS)
console.log('listening on port ' + port)

app.get('/', (req, res) => {
Expand Down

0 comments on commit 0b2fd56

Please sign in to comment.