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
7e3e8ae8
Commit
7e3e8ae8
authored
Oct 03, 2017
by
Kamil Trzcinski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Prefer to use `.tap` as `.try` hides an exceptions from workers
parent
f9164243
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
app/workers/wait_for_cluster_creation_worker.rb
app/workers/wait_for_cluster_creation_worker.rb
+2
-2
No files found.
app/workers/wait_for_cluster_creation_worker.rb
View file @
7e3e8ae8
...
@@ -7,11 +7,11 @@ class WaitForClusterCreationWorker
...
@@ -7,11 +7,11 @@ class WaitForClusterCreationWorker
TIMEOUT
=
20
.
minutes
TIMEOUT
=
20
.
minutes
def
perform
(
cluster_id
)
def
perform
(
cluster_id
)
Gcp
::
Cluster
.
find_by_id
(
cluster_id
).
t
ry
do
|
cluster
|
Gcp
::
Cluster
.
find_by_id
(
cluster_id
).
t
ap
do
|
cluster
|
Ci
::
FetchGcpOperationService
.
new
.
execute
(
cluster
)
do
|
operation
|
Ci
::
FetchGcpOperationService
.
new
.
execute
(
cluster
)
do
|
operation
|
case
operation
.
status
case
operation
.
status
when
'RUNNING'
when
'RUNNING'
if
TIMEOUT
<
Time
.
now
-
operation
.
start_time
.
to_time
if
TIMEOUT
<
Time
.
zone
.
now
-
operation
.
start_time
.
to_time
return
cluster
.
errored!
(
"Cluster creation time exceeds timeout;
#{
TIMEOUT
}
"
)
return
cluster
.
errored!
(
"Cluster creation time exceeds timeout;
#{
TIMEOUT
}
"
)
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