Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
grid5000
g5k-api
Commits
f58a03c9
Commit
f58a03c9
authored
Jul 17, 2020
by
Samir Noir
🧀
Browse files
Fix cancel_workflow! failure with rescue
parent
8ad05e36
Changes
1
Hide whitespace changes
Inline
Side-by-side
app/models/grid5000/deployment.rb
View file @
f58a03c9
...
...
@@ -109,11 +109,11 @@ module Grid5000
def
cancel_workflow!
raise
"cancel_workflow!"
if
!
user
or
!
base_uri
# Ugly hack
headers
=
{
'X-Remote-Ident'
=>
user
}
uri
=
File
.
join
(
base_uri
,
uid
)
http
=
http_request
(
:delete
,
uri
,
tls_options
,
15
,
headers
)
unless
%w{200 201 202 204}
.
include?
(
http
.
code
.
to_s
)
begin
headers
=
{
'X-Remote-Ident'
=>
user
}
uri
=
File
.
join
(
base_uri
,
uid
)
http
=
http_request
(
:delete
,
uri
,
tls_options
,
15
,
headers
)
rescue
error
(
"Unable to contact
#{
File
.
join
(
base_uri
,
uid
)
}
"
)
raise
self
.
output
+
"
\n
"
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