Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
CIRCLE
/
cloud
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
94
Merge Requests
10
Pipelines
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
1d852711
authored
Nov 03, 2014
by
Bach Dániel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
vm: fix test
parent
8328eea8
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
2 deletions
+3
-2
circle/vm/models/node.py
+3
-2
No files found.
circle/vm/models/node.py
View file @
1d852711
...
...
@@ -23,6 +23,7 @@ import os.path
from
warnings
import
warn
import
requests
from
salt.client
import
LocalClient
from
salt.exceptions
import
SaltClientError
import
salt.utils
from
time
import
time
,
sleep
...
...
@@ -169,11 +170,11 @@ class Node(OperatedMixin, TimeStampedModel):
@method_cache
(
20
)
def
get_minion_online
(
self
):
name
=
self
.
host
.
hostname
try
:
client
=
MyLocalClient
()
client
.
opts
[
'timeout'
]
=
0.2
try
:
return
bool
(
client
.
cmd
(
name
,
'test.ping'
)[
name
])
except
KeyError
:
except
(
KeyError
,
SaltClientError
)
:
return
False
minion_online
=
property
(
get_minion_online
)
...
...
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