Skip to content

Commit

Permalink
fix(request): add 50ms delay to search and cache api to prevent 503
Browse files Browse the repository at this point in the history
  • Loading branch information
leomp12 committed Mar 3, 2020
1 parent d6497d3 commit c0eb251
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/lib/request.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
import {
API_STORE,
API_STORE_CACHE,
API_PASSPORT,
API_SEARCH,
API_MODULES,
API_STOREFRONT,
API_GRAPHS,
Expand All @@ -11,6 +13,7 @@ import axios from './axios'
// set delay between requests by API
const delays = {}
delays[API_STORE] = delays[API_MODULES] = delays[API_PLATFORM] = 250
delays[API_STORE_CACHE] = delays[API_SEARCH] = 50
delays[API_STOREFRONT] = 400
delays[API_GRAPHS] = 570
delays[API_PASSPORT] = 1070
Expand Down

0 comments on commit c0eb251

Please sign in to comment.