Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
projects.thm.de
GitLab
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 @@ class InstallService < BaseHelmService
def
execute
return
unless
app
.
scheduled?
begin
app
.
make_installing!
helm_api
.
install
(
install_command
)
app
.
make_installing!
helm_api
.
install
(
install_command
)
ClusterWaitForAppInstallationWorker
.
perform_in
(
ClusterWaitForAppInstallationWorker
::
INTERVAL
,
app
.
name
,
app
.
id
)
rescue
Kubeclient
::
HttpError
=>
e
log_error
(
e
)
app
.
make_errored!
(
"Kubernetes error:
#{
e
.
error_code
}
"
)
rescue
StandardError
=>
e
log_error
(
e
)
app
.
make_errored!
(
"Can't start installation process."
)
end
ClusterWaitForAppInstallationWorker
.
perform_in
(
ClusterWaitForAppInstallationWorker
::
INTERVAL
,
app
.
name
,
app
.
id
)
rescue
Kubeclient
::
HttpError
=>
e
log_error
(
e
)
app
.
make_errored!
(
"Kubernetes error:
#{
e
.
error_code
}
"
)
rescue
StandardError
=>
e
log_error
(
e
)
app
.
make_errored!
(
"Can't start installation process."
)
end
end
end
...
...
app/services/clusters/applications/patch_service.rb
View file @
34d837b5
...
...
@@ -6,20 +6,18 @@ class PatchService < BaseHelmService
def
execute
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
::
INTERVAL
,
app
.
name
,
app
.
id
)
rescue
Kubeclient
::
HttpError
=>
e
log_error
(
e
)
app
.
make_update_errored!
(
"Kubernetes error:
#{
e
.
error_code
}
"
)
rescue
StandardError
=>
e
log_error
(
e
)
app
.
make_update_errored!
(
"Can't start update process."
)
end
ClusterWaitForAppInstallationWorker
.
perform_in
(
ClusterWaitForAppInstallationWorker
::
INTERVAL
,
app
.
name
,
app
.
id
)
rescue
Kubeclient
::
HttpError
=>
e
log_error
(
e
)
app
.
make_update_errored!
(
"Kubernetes error:
#{
e
.
error_code
}
"
)
rescue
StandardError
=>
e
log_error
(
e
)
app
.
make_update_errored!
(
"Can't start update process."
)
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