Skip to content

Commit 8dc0b2a

Browse files
committed
refs skygragon#139: customized delay before next try
Signed-off-by: Eric Wang <[email protected]>
1 parent 803e920 commit 8dc0b2a

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

Diff for: lib/config.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,8 @@ const DEFAULT_CONFIG = {
6868
theme: ''
6969
},
7070
network: {
71-
concurrency: 10
71+
concurrency: 10,
72+
delay: 1
7273
},
7374
plugins: {}
7475
};

Diff for: lib/plugins/leetcode.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,7 @@ function runCode(opts, problem, cb) {
179179
opts.headers.Origin = config.sys.urls.base;
180180
opts.headers.Referer = problem.link;
181181
opts.json = true;
182-
opts._delay = opts._delay || 1; // in seconds
182+
opts._delay = opts._delay || config.network.delay || 1; // in seconds
183183

184184
opts.body = opts.body || {};
185185
_.extendOwn(opts.body, {

0 commit comments

Comments
 (0)