Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 14 additions & 9 deletions Control/lib/api.js
Original file line number Diff line number Diff line change
Expand Up @@ -117,15 +117,20 @@

let aliEcsSynchronizer = undefined;
if (config.kafka && config.kafka?.enable) {
const kafkaClient = new Kafka({
clientId: 'control-gui',
brokers: config.kafka.brokers,
retry: { retries: 3 },
logLevel: logLevel.NOTHING,
});

aliEcsSynchronizer = new AliEcsSynchronizer(kafkaClient, cacheService);
aliEcsSynchronizer.start();
try {
const kafkaClient = new Kafka({

Check warning on line 121 in Control/lib/api.js

View check run for this annotation

Codecov / codecov/patch

Control/lib/api.js#L120-L121

Added lines #L120 - L121 were not covered by tests
clientId: 'control-gui',
brokers: config.kafka.brokers,
retry: { retries: 3 },
logLevel: logLevel.NOTHING,
});
aliEcsSynchronizer = new AliEcsSynchronizer(kafkaClient, cacheService);
aliEcsSynchronizer.start();

Check warning on line 128 in Control/lib/api.js

View check run for this annotation

Codecov / codecov/patch

Control/lib/api.js#L127-L128

Added lines #L127 - L128 were not covered by tests

} catch (error) {
logger.errorMessage(`Kafka initialization failed: ${error.message}`);

Check warning on line 131 in Control/lib/api.js

View check run for this annotation

Codecov / codecov/patch

Control/lib/api.js#L131

Added line #L131 was not covered by tests
}

}

const statusService = new StatusService(
Expand Down