rsudp/c_tweet.py 1 location
|
@@ 247-258 (lines=12) @@
|
244 |
|
|
245 |
|
self.last_message = message |
246 |
|
|
247 |
|
def run(self): |
248 |
|
""" |
249 |
|
Reads data from the queue and tweets a message if it sees an ALARM or IMGPATH message |
250 |
|
""" |
251 |
|
while True: |
252 |
|
d = self.getq() |
253 |
|
|
254 |
|
if 'ALARM' in str(d): |
255 |
|
self._when_alarm(d) |
256 |
|
|
257 |
|
elif 'IMGPATH' in str(d): |
258 |
|
self._when_img(d) |
259 |
|
|
rsudp/c_telegram.py 1 location
|
@@ 153-164 (lines=12) @@
|
150 |
|
printM('Could not find image: %s' % (imgpath), sender=self.sender) |
151 |
|
|
152 |
|
|
153 |
|
def run(self): |
154 |
|
""" |
155 |
|
Reads data from the queue and sends a message if it sees an ALARM or IMGPATH message |
156 |
|
""" |
157 |
|
while True: |
158 |
|
d = self.getq() |
159 |
|
|
160 |
|
if 'ALARM' in str(d): |
161 |
|
self._when_alarm(d) |
162 |
|
|
163 |
|
elif 'IMGPATH' in str(d): |
164 |
|
self._when_img(d) |
165 |
|
|