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
6 changes: 3 additions & 3 deletions lib/server/kafka/AliEcsSynchronizer.js
Original file line number Diff line number Diff line change
Expand Up @@ -72,10 +72,10 @@

this.ecsRunConsumer = new AliEcsEventMessagesConsumer(kafkaClient, RUN_CONSUMER_GROUP, RUN_TOPICS);
this.ecsRunConsumer.onMessageReceived(async (eventMessage) => {
const { timestamp, runEvent: { environmentId, runNumber, state, transition, lastRequestUser } } = eventMessage;
const { timestamp, runEvent: { environmentId, runNumber, transition, lastRequestUser } } = eventMessage;

Check warning on line 75 in lib/server/kafka/AliEcsSynchronizer.js

View check run for this annotation

Codecov / codecov/patch

lib/server/kafka/AliEcsSynchronizer.js#L75

Added line #L75 was not covered by tests
const { externalId: externalUserId, name: userName } = lastRequestUser ?? {};

if (state === 'CONFIGURED' && transition === 'START_ACTIVITY') {
if (transition === 'START_ACTIVITY') {

Check warning on line 78 in lib/server/kafka/AliEcsSynchronizer.js

View check run for this annotation

Codecov / codecov/patch

lib/server/kafka/AliEcsSynchronizer.js#L78

Added line #L78 was not covered by tests
runService
.createOrUpdate(
runNumber,
Expand All @@ -86,7 +86,7 @@
.catch((error) => this._logger.errorMessage(`Failed to save run start for ${runNumber}: ${error.message}`));
}

if (state === 'RUNNING' && transition === 'STOP_ACTIVITY') {
if (transition === 'STOP_ACTIVITY' || transition === 'GO_ERROR') {

Check warning on line 89 in lib/server/kafka/AliEcsSynchronizer.js

View check run for this annotation

Codecov / codecov/patch

lib/server/kafka/AliEcsSynchronizer.js#L89

Added line #L89 was not covered by tests
runService
.createOrUpdate(
runNumber,
Expand Down
Loading