Skip to content

Commit

Permalink
Use sendBeacon in all artificial hits
Browse files Browse the repository at this point in the history
8579475dba9f8dad03da7ed0528983cc91f90a91
  • Loading branch information
sabio committed Jun 11, 2024
1 parent 4dc8c0b commit 93a34f9
Showing 1 changed file with 3 additions and 8 deletions.
11 changes: 3 additions & 8 deletions src/providers/artificialHit/index.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import { flags } from '@inject';
import { ARTIFICIAL_HIT_FEATURE, PREPROD_FEATURE } from 'generated/features';
import { ARTIFICIAL_HIT_FEATURE } from 'generated/features';
import { commonMiddlewares, providerMiddlewareList } from 'src/middleware';
import { providersSync } from 'src/providersEntrypoint';
import { providerMap } from 'src/sender';
import { SenderWatch, useSenderWatch } from 'src/sender/watch';
import { fullList, nameMap, withoutBeacon } from 'src/transport';
import { fullList, nameMap } from 'src/transport';
import { ctxErrorLogger } from 'src/utils/errorLogger';
import { artificialHitProvider } from './artificialHit';
import { ARTIFICIAL_HIT_PROVIDER } from './const';
Expand All @@ -25,11 +25,6 @@ export const initProvider = () => {
providersSync.push(ctxErrorLogger('p.ar', artificialHitProvider));
providerMap[ARTIFICIAL_HIT_PROVIDER] = useSenderWatch;
providerMiddlewareList[ARTIFICIAL_HIT_PROVIDER] = commonMiddlewares;
if (flags[PREPROD_FEATURE]) {
// Needs to check safety usage of sendBeacon API in the artificial hit https://st.yandex-team.ru/METR-57359
nameMap[ARTIFICIAL_HIT_PROVIDER] = fullList;
} else {
nameMap[ARTIFICIAL_HIT_PROVIDER] = withoutBeacon;
}
nameMap[ARTIFICIAL_HIT_PROVIDER] = fullList;
}
};

0 comments on commit 93a34f9

Please sign in to comment.