Skip to content

Commit 83025f3

Browse files
polling bandits only when needed
1 parent b95e3df commit 83025f3

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

src/configuration-requestor.ts

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,12 @@
11
import { IConfigurationStore } from './configuration-store/configuration-store';
22
import { IHttpClient } from './http-client';
3-
import { BanditVariation, BanditParameters, Flag, Environment } from './interfaces';
3+
import {
4+
BanditVariation,
5+
BanditParameters,
6+
Flag,
7+
Environment,
8+
BanditReference,
9+
} from './interfaces';
410

511
type Entry = Flag | BanditVariation[] | BanditParameters;
612

@@ -76,7 +82,7 @@ export default class ConfigurationRequestor {
7682
throw new Error('Bandit parameters fetched but no bandit configuration store provided');
7783
}
7884
const referencedModelVersions = Object.values(banditReferences).map(
79-
(banditReference: BanditReference) => banditReference.modelVersion
85+
(banditReference: BanditReference) => banditReference.modelVersion,
8086
);
8187

8288
const banditModelVersionsInStore = this.getLoadedBanditModelVersions(

0 commit comments

Comments
 (0)