Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
dream
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
1
Issues
1
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
dream
Commits
d218f990
Commit
d218f990
authored
Jan 22, 2015
by
Jérome Perrin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ACO: fix score calculation, object class is no longer Dream.Job
parent
b0341834
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
dream/plugins/ACO.py
dream/plugins/ACO.py
+2
-2
No files found.
dream/plugins/ACO.py
View file @
d218f990
...
@@ -19,9 +19,9 @@ class ACO(plugin.ExecutionPlugin):
...
@@ -19,9 +19,9 @@ class ACO(plugin.ExecutionPlugin):
result
,
=
ant
[
'result'
][
'result_list'
]
#read the result as JSON
result
,
=
ant
[
'result'
][
'result_list'
]
#read the result as JSON
#loop through the elements
#loop through the elements
for
element
in
result
[
'elementList'
]:
for
element
in
result
[
'elementList'
]:
element
Class
=
element
[
'_class'
]
#get the class
element
_family
=
element
[
'family'
]
#id the class is Job
#id the class is Job
if
element
Class
==
'Dream.
Job'
:
if
element
_family
==
'
Job'
:
results
=
element
[
'results'
]
results
=
element
[
'results'
]
delay
=
float
(
results
.
get
(
'delay'
,
"0"
))
delay
=
float
(
results
.
get
(
'delay'
,
"0"
))
# A negative delay would mean we are ahead of schedule. This
# A negative delay would mean we are ahead of schedule. This
...
...
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