This repository was archived by the owner on Mar 13, 2025. It is now read-only.
File tree 3 files changed +13
-2
lines changed
3 files changed +13
-2
lines changed Original file line number Diff line number Diff line change @@ -76,7 +76,7 @@ workflows:
76
76
filters :
77
77
branches :
78
78
only :
79
- - dev
79
+ - gigs-optimize-b
80
80
81
81
# Production builds are exectuted only on tagged commits to the
82
82
# master branch.
Original file line number Diff line number Diff line change 1
1
import { 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" ;
3
7
import service from "../services/myGigs" ;
4
8
5
9
/**
@@ -35,6 +39,11 @@ async function startCheckingGigs(externalId) {
35
39
while ( i < CHECKING_GIG_TIMES ) {
36
40
const res = await service . startCheckingGigs ( externalId ) ;
37
41
if ( res && ! res . synced ) {
42
+ await new Promise ( ( resolve ) => {
43
+ setTimeout ( ( ) => {
44
+ resolve ( ) ;
45
+ } , DELAY_CHECK_GIG_TIME ) ;
46
+ } ) ;
38
47
i ++ ;
39
48
continue ;
40
49
} else {
Original file line number Diff line number Diff line change @@ -354,3 +354,5 @@ export const EMPTY_GIGS_TEXT =
354
354
"LOOKS LIKE YOU HAVEN'T APPLIED TO ANY GIG OPPORTUNITIES YET." ;
355
355
356
356
export 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