Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
Gutyán Gábor
/
circlestack
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
c5b3cd6a
authored
Nov 15, 2013
by
Dudás Ádám
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
manager: add trait checking to scheduler
parent
d5924475
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
0 deletions
+2
-0
circle/manager/scheduler.py
+2
-0
No files found.
circle/manager/scheduler.py
View file @
c5b3cd6a
...
@@ -3,6 +3,8 @@ def get_node(instance, nodes):
...
@@ -3,6 +3,8 @@ def get_node(instance, nodes):
'''
'''
# Return first Node or None
# Return first Node or None
try
:
try
:
req_traits
=
set
(
instance
.
req_traits
.
all
())
nodes
=
[
n
for
n
in
nodes
if
req_traits
.
issubset
(
n
.
traits
.
all
())]
return
nodes
[
0
]
return
nodes
[
0
]
except
:
except
:
return
None
return
None
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