Skip to content

Commit

Permalink
fix: job ordering for hs, initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
yashasvibajpai committed Apr 28, 2024
1 parent 54eca32 commit 6b901c2
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/v0/destinations/hs/transform.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
const get = require('get-value');
const { InstrumentationError } = require('@rudderstack/integrations-lib');
const { EventType } = require('../../../constants');
const { handleRtTfSingleEventError, getDestinationExternalIDInfoForRetl } = require('../../util');
const {
handleRtTfSingleEventError,
getDestinationExternalIDInfoForRetl,
groupEventsByType: batchEventsInOrder,
} = require('../../util');
const { API_VERSION } = require('./config');
const {
processLegacyIdentify,
Expand Down Expand Up @@ -66,6 +70,7 @@ const process = async (event) => {

// we are batching by default at routerTransform
const processRouterDest = async (inputs, reqMetadata) => {
const tempNewInputs = batchEventsInOrder(inputs);
let tempInputs = inputs;

const successRespList = [];
Expand Down Expand Up @@ -99,7 +104,7 @@ const processRouterDest = async (inputs, reqMetadata) => {
}

await Promise.all(
tempInputs.map(async (input) => {
tempNewInputs.map(async (input) => {
try {
if (input.message.statusCode) {
// already transformed event
Expand Down

0 comments on commit 6b901c2

Please sign in to comment.