Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 8dc0b2a

Browse files
refs skygragon#139: customized delay before next try
Signed-off-by: Eric Wang <skygragon@gmail.com>
1 parent 803e920 commit 8dc0b2a

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

‎lib/config.js

Lines changed: 2 additions & 1 deletion
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
};

‎lib/plugins/leetcode.js

Lines changed: 1 addition & 1 deletion
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)

AltStyle によって変換されたページ (->オリジナル) /