Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
Gelencsér Szabolcs
/
cloud
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
36538eb0
authored
Mar 15, 2014
by
Őry Máté
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
vm: fix boolean comparsions
parent
f8bb2ede
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
circle/vm/models/node.py
+3
-3
No files found.
circle/vm/models/node.py
View file @
36538eb0
...
...
@@ -29,7 +29,7 @@ def node_available(function):
"""Decorate methods to ignore disabled Nodes.
"""
def
decorate
(
self
,
*
args
,
**
kwargs
):
if
self
.
enabled
is
True
and
self
.
online
is
Tru
e
:
if
self
.
enabled
and
self
.
onlin
e
:
return
function
(
self
,
*
args
,
**
kwargs
)
else
:
return
None
...
...
@@ -106,7 +106,7 @@ class Node(TimeStampedModel):
def
disable
(
self
,
user
=
None
):
''' Disable the node.'''
if
self
.
enabled
is
True
:
if
self
.
enabled
:
with
node_activity
(
code_suffix
=
'disable'
,
node
=
self
,
user
=
user
):
self
.
enabled
=
False
self
.
save
()
...
...
@@ -148,7 +148,7 @@ class Node(TimeStampedModel):
self
.
node_online
()
return
self
.
host
.
hostname
+
"."
+
queue_id
else
:
if
self
.
enabled
is
True
:
if
self
.
enabled
:
self
.
node_offline
()
raise
WorkerNotFound
()
...
...
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