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
6040e1ba
Commit
6040e1ba
authored
Jan 18, 2016
by
Valery Sizov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ES: fix situation when ES is disabled
parent
f24eaccb
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
3 deletions
+13
-3
app/elastic/application_search.rb
app/elastic/application_search.rb
+13
-3
No files found.
app/elastic/application_search.rb
View file @
6040e1ba
...
...
@@ -43,10 +43,20 @@ module ApplicationSearch
}
}
}
if
Gitlab
.
config
.
elasticsearch
.
enabled
after_commit
on: :create
do
ElasticIndexerWorker
.
perform_async
(
:index
,
self
.
class
.
to_s
,
self
.
id
)
end
after_commit
->
{
ElasticIndexerWorker
.
perform_async
(
:index
,
self
.
class
.
to_s
,
self
.
id
)
},
on: :create
after_commit
->
{
ElasticIndexerWorker
.
perform_async
(
:update
,
self
.
class
.
to_s
,
self
.
id
)
},
on: :update
after_commit
->
{
ElasticIndexerWorker
.
perform_async
(
:delete
,
self
.
class
.
to_s
,
self
.
id
)
},
on: :destroy
after_commit
on: :update
do
ElasticIndexerWorker
.
perform_async
(
:update
,
self
.
class
.
to_s
,
self
.
id
)
end
after_commit
on: :destroy
do
ElasticIndexerWorker
.
perform_async
(
:delete
,
self
.
class
.
to_s
,
self
.
id
)
end
end
end
module
ClassMethods
...
...
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