Skip to content

Commit

Permalink
feat: improve prom and error handling (#39)
Browse files Browse the repository at this point in the history
Co-authored-by: Diego Sampaio <[email protected]>
  • Loading branch information
ggazzo and sampaiodiego authored Jul 7, 2023
1 parent c50e544 commit 9f46753
Show file tree
Hide file tree
Showing 9 changed files with 453 additions and 428 deletions.
5 changes: 3 additions & 2 deletions src/agent.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,10 @@ import { config } from './config';
import { rand } from './lib/rand';
import { getClients } from './macros/getClients';
import { populateDatabase, isOnlyUserPopulation } from './populate';
import { OmnichannelClient } from './client/Omnichannel';

export default (): void => {
let agents: Client[];
let agents: OmnichannelClient[];

const b = new (class extends BenchmarkRunner {
private db: Db | undefined;
Expand Down Expand Up @@ -117,7 +118,7 @@ export default (): void => {
}

console.log(this.usernames);
agents = await getClients(config.HOW_MANY_USERS, this.extraPrefix, this.getCurrentFromUsers(this.usernames));
agents = await getClients(OmnichannelClient, config.HOW_MANY_USERS, this.extraPrefix, this.getCurrentFromUsers(this.usernames));

const settings = this.db.collection('rocketchat_settings');
await settings.updateOne(
Expand Down
Loading

0 comments on commit 9f46753

Please sign in to comment.