Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
rouzwelt committed Nov 3, 2024
1 parent 1d59479 commit 184b77f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 7 deletions.
8 changes: 2 additions & 6 deletions src/cli.ts
Original file line number Diff line number Diff line change
Expand Up @@ -371,7 +371,7 @@ export async function startup(argv: any, version?: string, tracer?: Tracer, ctx?
const poolUpdateInterval = _poolUpdateInterval * 60 * 1000;
let ordersDetails: any[] = [];
if (!process?.env?.TEST)
for (let i = 0; i < 20; i++) {
for (let i = 0; i < 3; i++) {
try {
ordersDetails = await getOrderDetails(options.subgraph, {
orderHash: options.orderHash,
Expand All @@ -380,7 +380,7 @@ export async function startup(argv: any, version?: string, tracer?: Tracer, ctx?
});
break;
} catch (e) {
if (i != 19) await sleep(10000 * (i + 1));
if (i != 2) await sleep(10000 * (i + 1));
else throw e;
}
}
Expand Down Expand Up @@ -458,10 +458,6 @@ export const main = async (argv: any, version?: string) => {
startupSpan.end();
await sleep(20000);

// flush and close the otel connection.
await exporter.shutdown();
await sleep(10000);

// reject the promise that makes the cli process to exit with error
return Promise.reject(e);
}
Expand Down
2 changes: 1 addition & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ export async function getOrderDetails(
const ordersDetails: any[] = [];
const isInvalidSg = !Array.isArray(sgs) || sgs.length === 0;

if (isInvalidSg) throw "type of provided sources are invalid";
if (isInvalidSg) throw "type of provided sources for reading orders are invalid";
else {
let availableSgs: string[] = [];
const promises: Promise<any>[] = [];
Expand Down

0 comments on commit 184b77f

Please sign in to comment.