mirror of
https://github.com/freqtrade/frequi.git
synced 2024-11-10 02:11:57 +00:00
Update timeout to 2 minutes
This commit is contained in:
parent
bd45b819fe
commit
d593b04e23
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user