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
b5e6b485
Commit
b5e6b485
authored
Oct 23, 2019
by
Douglas Barbosa Alexandre
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use qualified column name when convertin resoures to job args
parent
4c3c2051
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
3 deletions
+3
-3
ee/app/workers/geo/file_download_dispatch_worker/attachment_job_finder.rb
...eo/file_download_dispatch_worker/attachment_job_finder.rb
+1
-1
ee/app/workers/geo/file_download_dispatch_worker/job_finder.rb
...p/workers/geo/file_download_dispatch_worker/job_finder.rb
+2
-2
No files found.
ee/app/workers/geo/file_download_dispatch_worker/attachment_job_finder.rb
View file @
b5e6b485
...
@@ -15,7 +15,7 @@ module Geo
...
@@ -15,7 +15,7 @@ module Geo
# rubocop: disable CodeReuse/ActiveRecord
# rubocop: disable CodeReuse/ActiveRecord
def
convert_resource_relation_to_job_args
(
relation
)
def
convert_resource_relation_to_job_args
(
relation
)
relation
.
pluck
(
:id
,
:uploader
)
relation
.
pluck
(
:id
,
:uploader
)
.
map
{
|
id
,
uploader
|
[
uploader
.
sub
(
/Uploader\z/
,
''
).
underscore
,
id
]
}
.
map
!
{
|
id
,
uploader
|
[
uploader
.
sub
(
/Uploader\z/
,
''
).
underscore
,
id
]
}
end
end
# rubocop: enable CodeReuse/ActiveRecord
# rubocop: enable CodeReuse/ActiveRecord
...
...
ee/app/workers/geo/file_download_dispatch_worker/job_finder.rb
View file @
b5e6b485
...
@@ -50,13 +50,13 @@ module Geo
...
@@ -50,13 +50,13 @@ module Geo
# rubocop: disable CodeReuse/ActiveRecord
# rubocop: disable CodeReuse/ActiveRecord
def
convert_resource_relation_to_job_args
(
relation
)
def
convert_resource_relation_to_job_args
(
relation
)
relation
.
pluck
(
:id
).
map
{
|
id
|
[
self
.
class
::
FILE_SERVICE_OBJECT_TYPE
.
to_s
,
id
]
}
relation
.
pluck
(
relation
.
model
.
arel_table
[
:id
]).
map!
{
|
id
|
[
self
.
class
::
FILE_SERVICE_OBJECT_TYPE
.
to_s
,
id
]
}
end
end
# rubocop: enable CodeReuse/ActiveRecord
# rubocop: enable CodeReuse/ActiveRecord
# rubocop: disable CodeReuse/ActiveRecord
# rubocop: disable CodeReuse/ActiveRecord
def
convert_registry_relation_to_job_args
(
relation
)
def
convert_registry_relation_to_job_args
(
relation
)
relation
.
pluck
(
self
.
class
::
RESOURCE_ID_KEY
).
map
{
|
id
|
[
self
.
class
::
FILE_SERVICE_OBJECT_TYPE
.
to_s
,
id
]
}
relation
.
pluck
(
self
.
class
::
RESOURCE_ID_KEY
).
map
!
{
|
id
|
[
self
.
class
::
FILE_SERVICE_OBJECT_TYPE
.
to_s
,
id
]
}
end
end
# rubocop: enable CodeReuse/ActiveRecord
# rubocop: enable CodeReuse/ActiveRecord
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