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
12765483
Commit
12765483
authored
Apr 11, 2014
by
Ioannis Papagiannopoulos
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
reactivate victim of ObjectInterruption now signals the victim with an interruptionEnd event
parent
a71f581e
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
1 deletion
+9
-1
dream/simulation/Failure.py
dream/simulation/Failure.py
+7
-0
dream/simulation/ObjectInterruption.py
dream/simulation/ObjectInterruption.py
+2
-1
No files found.
dream/simulation/Failure.py
View file @
12765483
...
...
@@ -111,3 +111,10 @@ class Failure(ObjectInterruption):
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
#===========================================================================
# interrupts the victim
#===========================================================================
def
interruptVictim
(
self
):
ObjectInterruption
.
interrupt
(
self
)
# TODO: check whether it is a good idea to update the failure timers here
\ No newline at end of file
dream/simulation/ObjectInterruption.py
View file @
12765483
...
...
@@ -89,7 +89,8 @@ class ObjectInterruption(Process):
#reactivate the victim
def
reactivateVictim
(
self
):
reactivate
(
self
.
victim
)
self
.
victim
.
interruptionEnd
.
signal
(
victim
)
# reactivate(self.victim)
#outputs message to the trace.xls. Format is (Simulation Time | Victim Name | message)
def
outputTrace
(
self
,
message
):
...
...
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