Skip to content

Commit

Permalink
Update timeout to 2 minutes
Browse files Browse the repository at this point in the history
  • Loading branch information
xmatthias committed May 28, 2024
1 parent bd45b81 commit d593b04
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/stores/ftbot.ts
Original file line number Diff line number Diff line change
Expand Up @@ -399,18 +399,19 @@ export function createBotSubStore(botId: string, botName: string) {
const settingsStore = useSettingsStore();
let result: PairHistory | null = null;
const loadingTimer = setTimeout(() => (this.historyTakesLonger = true), 10000);
const timeout = 2 * 60 * 1000; // in MS
if (this.botApiVersion >= 2.35 && settingsStore.useReducedPairCalls) {
// Modern approach, allowing filtering of columns
const { data } = await api.post<PairHistoryPayload, AxiosResponse<PairHistory>>(
'/pair_history',
payload,
{ timeout: 50000 },
{ timeout },
);
result = data;
} else {
const { data } = await api.get<PairHistory>('/pair_history', {
params: { ...payload },
timeout: 50000,
timeout,
});
result = data;
}
Expand Down

0 comments on commit d593b04

Please sign in to comment.