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
Boxiang Sun
gitlab-ce
Commits
34d837b5
Commit
34d837b5
authored
Mar 06, 2019
by
João Cunha
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove unecessary begin..end block
parent
70e44301
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
20 additions
and
24 deletions
+20
-24
app/services/clusters/applications/install_service.rb
app/services/clusters/applications/install_service.rb
+10
-12
app/services/clusters/applications/patch_service.rb
app/services/clusters/applications/patch_service.rb
+10
-12
No files found.
app/services/clusters/applications/install_service.rb
View file @
34d837b5
...
@@ -6,19 +6,17 @@ module Clusters
...
@@ -6,19 +6,17 @@ module Clusters
def
execute
def
execute
return
unless
app
.
scheduled?
return
unless
app
.
scheduled?
begin
app
.
make_installing!
app
.
make_installing!
helm_api
.
install
(
install_command
)
helm_api
.
install
(
install_command
)
ClusterWaitForAppInstallationWorker
.
perform_in
(
ClusterWaitForAppInstallationWorker
.
perform_in
(
ClusterWaitForAppInstallationWorker
::
INTERVAL
,
app
.
name
,
app
.
id
)
ClusterWaitForAppInstallationWorker
::
INTERVAL
,
app
.
name
,
app
.
id
)
rescue
Kubeclient
::
HttpError
=>
e
rescue
Kubeclient
::
HttpError
=>
e
log_error
(
e
)
log_error
(
e
)
app
.
make_errored!
(
"Kubernetes error:
#{
e
.
error_code
}
"
)
app
.
make_errored!
(
"Kubernetes error:
#{
e
.
error_code
}
"
)
rescue
StandardError
=>
e
rescue
StandardError
=>
e
log_error
(
e
)
log_error
(
e
)
app
.
make_errored!
(
"Can't start installation process."
)
app
.
make_errored!
(
"Can't start installation process."
)
end
end
end
end
end
end
end
...
...
app/services/clusters/applications/patch_service.rb
View file @
34d837b5
...
@@ -6,20 +6,18 @@ module Clusters
...
@@ -6,20 +6,18 @@ module Clusters
def
execute
def
execute
return
unless
app
.
scheduled?
return
unless
app
.
scheduled?
begin
app
.
make_updating!
app
.
make_updating!
helm_api
.
update
(
update_command
)
helm_api
.
update
(
update_command
)
ClusterWaitForAppInstallationWorker
.
perform_in
(
ClusterWaitForAppInstallationWorker
.
perform_in
(
ClusterWaitForAppInstallationWorker
::
INTERVAL
,
app
.
name
,
app
.
id
)
ClusterWaitForAppInstallationWorker
::
INTERVAL
,
app
.
name
,
app
.
id
)
rescue
Kubeclient
::
HttpError
=>
e
rescue
Kubeclient
::
HttpError
=>
e
log_error
(
e
)
log_error
(
e
)
app
.
make_update_errored!
(
"Kubernetes error:
#{
e
.
error_code
}
"
)
app
.
make_update_errored!
(
"Kubernetes error:
#{
e
.
error_code
}
"
)
rescue
StandardError
=>
e
rescue
StandardError
=>
e
log_error
(
e
)
log_error
(
e
)
app
.
make_update_errored!
(
"Can't start update process."
)
app
.
make_update_errored!
(
"Can't start update process."
)
end
end
end
end
end
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