This repository was archived by the owner on Mar 13, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 3 files changed +13
-2
lines changed Expand file tree Collapse file tree 3 files changed +13
-2
lines changed Original file line number Diff line number Diff line change @@ -76,7 +76,7 @@ workflows:
7676 filters :
7777 branches :
7878 only :
79- - dev
79+ - gigs-optimize-b
8080
8181 # Production builds are exectuted only on tagged commits to the
8282 # master branch.
Original file line number Diff line number Diff line change 11import { createActions } from "redux-actions" ;
2- import { PER_PAGE , CHECKING_GIG_TIMES } from "../constants" ;
2+ import {
3+ PER_PAGE ,
4+ CHECKING_GIG_TIMES ,
5+ DELAY_CHECK_GIG_TIME ,
6+ } from "../constants" ;
37import service from "../services/myGigs" ;
48
59/**
@@ -35,6 +39,11 @@ async function startCheckingGigs(externalId) {
3539 while ( i < CHECKING_GIG_TIMES ) {
3640 const res = await service . startCheckingGigs ( externalId ) ;
3741 if ( res && ! res . synced ) {
42+ await new Promise ( ( resolve ) => {
43+ setTimeout ( ( ) => {
44+ resolve ( ) ;
45+ } , DELAY_CHECK_GIG_TIME ) ;
46+ } ) ;
3847 i ++ ;
3948 continue ;
4049 } else {
Original file line number Diff line number Diff line change @@ -354,3 +354,5 @@ export const EMPTY_GIGS_TEXT =
354354 "LOOKS LIKE YOU HAVEN'T APPLIED TO ANY GIG OPPORTUNITIES YET." ;
355355
356356export const CHECKING_GIG_TIMES = 3 ;
357+
358+ export const DELAY_CHECK_GIG_TIME = 2000 ;
You can’t perform that action at this time.
0 commit comments