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
92a03a94
Commit
92a03a94
authored
Sep 19, 2014
by
Ioannis Papagiannopoulos
Committed by
Georgios Dagkakis
Nov 17, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
currentOperator of victim choosen according to the assignments of the router
parent
d268ba81
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
1 deletion
+8
-1
dream/simulation/OperatedPoolBroker.py
dream/simulation/OperatedPoolBroker.py
+8
-1
No files found.
dream/simulation/OperatedPoolBroker.py
View file @
92a03a94
...
...
@@ -132,7 +132,14 @@ class Broker(ObjectInterruption):
assert
self
.
victim
.
operatorPool
.
checkIfResourceIsAvailable
(),
'there is no available operator to request'
# set the available resource as the currentOperator
self
.
victim
.
currentOperator
=
self
.
victim
.
operatorPool
.
findAvailableOperator
()
currentOperator
=
None
for
operator
in
self
.
victim
.
operatorPool
.
operators
:
if
operator
.
isAssignedTo
()
==
self
.
victim
:
currentOperator
=
operator
break
self
.
victim
.
currentOperator
=
currentOperator
if
not
currentOperator
:
self
.
victim
.
currentOperator
=
self
.
victim
.
operatorPool
.
findAvailableOperator
()
with
self
.
victim
.
operatorPool
.
getResource
(
self
.
victim
.
currentOperator
).
request
()
as
request
:
...
...
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