File tree Expand file tree Collapse file tree 1 file changed +7
-5
lines changed
Expand file tree Collapse file tree 1 file changed +7
-5
lines changed Original file line number Diff line number Diff line change @@ -114,6 +114,8 @@ const getMarketStats = async fiats => {
114114 } ;
115115
116116 nodeCache . set ( `${ COINGECKO_MARKET_STATS } -${ fiat } ` , marketStats ) ;
117+
118+ await sleep ( 20000 ) ;
117119 }
118120 } catch ( err ) {
119121 // rate limited
@@ -276,15 +278,15 @@ cron.schedule("0 1 * * *", async () => {
276278 getMarketCapStats ( ) ;
277279} ) ;
278280
279- // Every 30 seconds
280- cron . schedule ( "*/30 * * * * *" , async ( ) => {
281+ // Every 2 minute
282+ cron . schedule ( "*/2 * * * *" , async ( ) => {
281283 getPriceStats ( defaultFiats ) ;
282284 getMarketStats ( defaultFiats ) ;
283285} ) ;
284286
285- // https://crontab.guru/#*/2_ *_*_*_*
286- // At every 2nd minute.
287- cron . schedule ( "*/2 * * * *" , async ( ) => {
287+ // https://crontab.guru/#*/10_ *_*_*_*
288+ // At every 10nd minute.
289+ cron . schedule ( "*/10 * * * *" , async ( ) => {
288290 getPriceStats ( secondaryFiats ) ;
289291 getMarketStats ( secondaryFiats ) ;
290292} ) ;
You can’t perform that action at this time.
0 commit comments