Skip to content

Commit

Permalink
Merge d865dec into 713226c
Browse files Browse the repository at this point in the history
  • Loading branch information
Pavel Rybalko committed Mar 25, 2015
2 parents 713226c + d865dec commit 881e165
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
2 changes: 2 additions & 0 deletions concert/base.py
Expand Up @@ -9,6 +9,7 @@
from concert.helpers import memoize
from concert.async import async, wait, busy_wait
from concert.quantities import q
from concert.async import dispatcher


LOG = logging.getLogger(__name__)
Expand Down Expand Up @@ -315,6 +316,7 @@ def __set__(self, instance, value):
msg = "set {}::{}='{}'"
name = instance.__class__.__name__
LOG.info(msg.format(name, self.name, value))
dispatcher.send(instance, "value_changed")
except KeyboardInterrupt:
cancel_name = '_cancel_' + self.name
if hasattr(instance, cancel_name):
Expand Down
3 changes: 3 additions & 0 deletions concert/devices/shutters/base.py
Expand Up @@ -2,6 +2,7 @@
from concert.base import check, State, AccessorNotImplementedError
from concert.async import async
from concert.devices.base import Device
from concert.async import dispatcher


class Shutter(Device):
Expand All @@ -20,6 +21,7 @@ def open(self):
Open the shutter."""
self._open()
dispatcher.send(self, "state_changed")

@async
@check(source='open', target='closed')
Expand All @@ -28,6 +30,7 @@ def close(self):
Close the shutter."""
self._close()
dispatcher.send(self, "state_changed")

def _open(self):
raise AccessorNotImplementedError
Expand Down

0 comments on commit 881e165

Please sign in to comment.