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
1
Merge Requests
1
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
nexedi
gitlab-ce
Commits
89ca576e
Commit
89ca576e
authored
Feb 23, 2017
by
Douglas Barbosa Alexandre
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix query that fetches projects that aren't synced yet
parent
820fcc30
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
2 deletions
+3
-2
app/workers/geo_backfill_worker.rb
app/workers/geo_backfill_worker.rb
+3
-2
No files found.
app/workers/geo_backfill_worker.rb
View file @
89ca576e
...
@@ -3,6 +3,7 @@ class GeoBackfillWorker
...
@@ -3,6 +3,7 @@ class GeoBackfillWorker
include
CronjobQueue
include
CronjobQueue
RUN_TIME
=
5
.
minutes
.
to_i
.
freeze
RUN_TIME
=
5
.
minutes
.
to_i
.
freeze
BATCH_SIZE
=
100
.
freeze
def
perform
def
perform
start
=
Time
.
now
start
=
Time
.
now
...
@@ -30,8 +31,8 @@ class GeoBackfillWorker
...
@@ -30,8 +31,8 @@ class GeoBackfillWorker
def
find_project_ids
def
find_project_ids
return
[]
if
Project
.
count
==
Geo
::
ProjectRegistry
.
count
return
[]
if
Project
.
count
==
Geo
::
ProjectRegistry
.
count
Project
.
where
.
not
(
id:
Geo
::
ProjectRegistry
.
pluck
(
:id
))
Project
.
where
.
not
(
id:
Geo
::
ProjectRegistry
.
pluck
(
:
project_
id
))
.
limit
(
100
)
.
limit
(
BATCH_SIZE
)
.
pluck
(
:id
)
.
pluck
(
:id
)
end
end
...
...
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