Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Jérome Perrin
gitlab-ce
Commits
ce9355c8
Commit
ce9355c8
authored
Apr 24, 2018
by
Toon Claes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Due to caching, there is no need to check the settings every loop
parent
51419847
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
1 deletion
+2
-1
app/workers/repository_check/batch_worker.rb
app/workers/repository_check/batch_worker.rb
+2
-1
No files found.
app/workers/repository_check/batch_worker.rb
View file @
ce9355c8
...
@@ -6,6 +6,8 @@ module RepositoryCheck
...
@@ -6,6 +6,8 @@ module RepositoryCheck
RUN_TIME
=
3600
RUN_TIME
=
3600
def
perform
def
perform
break
unless
Gitlab
::
CurrentSettings
.
repository_checks_enabled
start
=
Time
.
now
start
=
Time
.
now
# This loop will break after a little more than one hour ('a little
# This loop will break after a little more than one hour ('a little
...
@@ -15,7 +17,6 @@ module RepositoryCheck
...
@@ -15,7 +17,6 @@ module RepositoryCheck
# check, only one (or two) will be checked at a time.
# check, only one (or two) will be checked at a time.
project_ids
.
each
do
|
project_id
|
project_ids
.
each
do
|
project_id
|
break
if
Time
.
now
-
start
>=
RUN_TIME
break
if
Time
.
now
-
start
>=
RUN_TIME
break
unless
Gitlab
::
CurrentSettings
.
repository_checks_enabled
next
unless
try_obtain_lease
(
project_id
)
next
unless
try_obtain_lease
(
project_id
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment