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
6d1d9adc
Commit
6d1d9adc
authored
Feb 14, 2014
by
Georgios Dagkakis
Committed by
Jérome Perrin
Feb 19, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
enhancement in Failure
parent
a1af12b6
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
dream/simulation/Failure.py
dream/simulation/Failure.py
+2
-2
No files found.
dream/simulation/Failure.py
View file @
6d1d9adc
...
...
@@ -90,7 +90,7 @@ class Failure(ObjectInterruption):
self
.
outputTrace
(
"is down"
)
# update the failure time
failTime
=
now
()
if
(
self
.
repairman
!=
"None"
):
#if the failure needs a resource to be fixed, the machine waits until the
if
(
self
.
repairman
and
self
.
repairman
!=
'None'
):
#if the failure needs a resource to be fixed, the machine waits until the
#resource is available
yield
request
,
self
,
self
.
repairman
.
getResource
()
# update the time that the repair started
...
...
@@ -104,6 +104,6 @@ class Failure(ObjectInterruption):
self
.
reactivateVictim
()
# since repairing is over, the Machine is reactivated
self
.
victim
.
Up
=
True
self
.
outputTrace
(
"is up"
)
if
(
self
.
repairman
!=
"None"
):
#if a resource was used, it is now released
if
(
self
.
repairman
and
self
.
repairman
!=
'None'
):
#if a resource was used, it is now released
yield
release
,
self
,
self
.
repairman
.
getResource
()
self
.
repairman
.
totalWorkingTime
+=
now
()
-
timeOperationStarted
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