Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
T
tv_panel
Manage
Activity
Members
Plan
Wiki
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Container registry
Model registry
Analyze
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Hermod
tv_panel
Commits
b316f89b
Commit
b316f89b
authored
7 years ago
by
Ayc0
Browse files
Options
Downloads
Patches
Plain Diff
Simplify TTL use in interval
parent
0d2d0501
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
server/utils.js
+1
-4
1 addition, 4 deletions
server/utils.js
with
1 addition
and
4 deletions
server/utils.js
+
1
−
4
View file @
b316f89b
...
...
@@ -19,10 +19,7 @@ const interval = (fn, initialTTL, output = {}) => {
if
(
this
.
cleared
)
{
return
;
}
TTL
=
fn
();
if
(
TTL
instanceof
Promise
)
{
TTL
=
await
TTL
;
}
TTL
=
await
Promise
.
resolve
(
fn
());
}
catch
(
error
)
{
console
.
error
(
error
);
TTL
=
initialTTL
;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment