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
6aaa08e1
Commit
6aaa08e1
authored
Feb 27, 2015
by
Georgios Dagkakis
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
plugin made more generic
parent
bb5c7477
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
14 deletions
+19
-14
dream/plugins/CreateCapacityStations.py
dream/plugins/CreateCapacityStations.py
+19
-14
No files found.
dream/plugins/CreateCapacityStations.py
View file @
6aaa08e1
...
...
@@ -35,6 +35,8 @@ class CreateCapacityStations(plugin.InputPreparationPlugin):
}
if
requireFullProject
:
data
[
'graph'
][
'node'
][
bufferId
][
'notRequiredOperations'
]
=
self
.
findNotRequiredOperations
(
originalData
,
stationId
)
data
[
'graph'
][
'node'
][
stationId
][
'notProcessOutsideThreshold'
]
=
1
# create an edge that connects the CapacityStationBuffer to the CapacityStation
data
[
'graph'
][
'edge'
][
bufferId
+
'_to_'
+
stationId
]
=
{
...
...
@@ -60,19 +62,22 @@ class CreateCapacityStations(plugin.InputPreparationPlugin):
"_class"
:
"Dream.Edge"
}
# XXX another patch, these should be inputted
if
stationId
==
'PPASB'
:
data
[
'graph'
][
'node'
][
stationId
][
'sharedResources'
]
=
{
"stationIds"
:
[
"ASBTST"
],
"priority"
:
3
}
data
[
'graph'
][
'node'
][
stationId
][
'notProcessOutsideThreshold'
]
=
1
if
stationId
==
'ASBTST'
:
# if projects shares from a pool read which others share resources and create
# the sharedResources element
pool
=
data
[
'graph'
][
'node'
][
stationId
].
get
(
'pool'
,
''
)
if
pool
:
sharingStations
=
[]
priority
=
data
[
'graph'
][
'node'
][
stationId
].
get
(
'priority'
,
None
)
for
other_id
,
other_node
in
originalData
[
'graph'
][
'node'
].
iteritems
():
if
other_id
==
stationId
:
continue
otherPool
=
other_node
.
get
(
'pool'
,
''
)
if
otherPool
==
pool
:
sharingStations
.
append
(
other_id
)
data
[
'graph'
][
'node'
][
stationId
][
'sharedResources'
]
=
{
"stationIds"
:
[
"PPASB"
]
,
"priority"
:
2
"stationIds"
:
sharingStations
,
"priority"
:
priority
}
data
[
'graph'
][
'node'
][
stationId
][
'notProcessOutsideThreshold'
]
=
1
# add also a CapacityStationController
# XXX some of the attributes should be inputted by the user
...
...
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