Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
C
cocoapods
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
gengmeiios
cocoapods
Commits
8622e042
Commit
8622e042
authored
Oct 27, 2015
by
Muhammed Yavuz Nuzumlali
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Export daemon process of search index updating to a method
parent
75ecb8fe
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
9 deletions
+15
-9
sources_manager.rb
lib/cocoapods/sources_manager.rb
+15
-9
No files found.
lib/cocoapods/sources_manager.rb
View file @
8622e042
...
@@ -190,8 +190,8 @@ module Pod
...
@@ -190,8 +190,8 @@ module Pod
def
save_search_index
(
index
)
def
save_search_index
(
index
)
require
'json'
require
'json'
@updated_search_index
=
index
@updated_search_index
=
index
File
.
open
(
search_index_path
,
'w'
)
do
|
file
|
search_index_path
.
open
(
'w'
)
do
|
io
|
file
.
write
(
@updated_search_index
.
to_json
)
io
.
write
(
@updated_search_index
.
to_json
)
end
end
end
end
...
@@ -239,6 +239,15 @@ module Pod
...
@@ -239,6 +239,15 @@ module Pod
save_search_index
(
search_index
)
if
search_index
save_search_index
(
search_index
)
if
search_index
end
end
# Updates search index for changed pods in background
def
update_search_index_if_needed_in_background
(
changed_spec_paths
)
Process
.
fork
do
Process
.
daemon
update_search_index_if_needed
(
changed_spec_paths
)
exit
end
end
# Updates the local clone of the spec-repo with the given name or of all
# Updates the local clone of the spec-repo with the given name or of all
# the git repos if the name is omitted.
# the git repos if the name is omitted.
#
#
...
@@ -262,12 +271,8 @@ module Pod
...
@@ -262,12 +271,8 @@ module Pod
check_version_information
(
source
.
repo
)
check_version_information
(
source
.
repo
)
end
end
end
end
# Perform search index update operation as a subprocess.
# Perform search index update operation in background.
Process
.
fork
do
update_search_index_if_needed_in_background
(
changed_spec_paths
)
Process
.
daemon
update_search_index_if_needed
(
changed_spec_paths
)
exit
end
end
end
# Returns whether a source is a GIT repo.
# Returns whether a source is a GIT repo.
...
@@ -526,4 +531,4 @@ module Pod
...
@@ -526,4 +531,4 @@ module Pod
end
end
end
end
end
end
end
end
\ No newline at end of file
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