Browse Source

handle default values

pull/15098/head
Jonas Koch 4 months ago
parent
commit
0b6cef9c53
No known key found for this signature in database GPG Key ID: F85C2585710855CE
  1. 2
      msa/js-executor/queue/kafkaTemplate.ts
  2. 3
      msa/js-executor/queue/oAuthBearerProvider.ts

2
msa/js-executor/queue/kafkaTemplate.ts

@ -98,7 +98,7 @@ export class KafkaTemplate implements IQueue {
clientId: config.get('kafka.confluent.oauth.client_id'), clientId: config.get('kafka.confluent.oauth.client_id'),
clientSecret: config.get('kafka.confluent.oauth.client_secret'), clientSecret: config.get('kafka.confluent.oauth.client_secret'),
host: config.get('kafka.confluent.oauth.endpoint_url'), host: config.get('kafka.confluent.oauth.endpoint_url'),
refreshThresholdMs: config.get('kafka.confluent.oauth.refresh_threshold'), refreshThresholdMs: config.has('kafka.confluent.oauth.refresh_threshold')?config.get('kafka.confluent.oauth.refresh_threshold'):60000,
}) })
}; };
} }

3
msa/js-executor/queue/oAuthBearerProvider.ts

@ -15,7 +15,8 @@
/// ///
import { AccessToken, ClientCredentials } from 'simple-oauth2' import { AccessToken, ClientCredentials } from 'simple-oauth2'
import { _logger, KafkaJsWinstonLogCreator } from '../config/logger'; import { _logger } from '../config/logger';
import { error } from 'winston';
interface OauthBearerProviderOptions { interface OauthBearerProviderOptions {
clientId: string; clientId: string;

Loading…
Cancel
Save