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
|
@@ 162-173 (lines=12) @@
|
159 |
|
printM('Could not find image: %s' % (imgpath), sender=self.sender) |
160 |
|
|
161 |
|
|
162 |
|
def run(self): |
163 |
|
""" |
164 |
|
Reads data from the queue and sends a message if it sees an ALARM or IMGPATH message |
165 |
|
""" |
166 |
|
while True: |
167 |
|
d = self.getq() |
168 |
|
|
169 |
|
if 'ALARM' in str(d): |
170 |
|
self._when_alarm(d) |
171 |
|
|
172 |
|
elif 'IMGPATH' in str(d): |
173 |
|
self._when_img(d) |
174 |
|
|