rsudp/c_tweet.py 1 location
|
@@ 219-230 (lines=12) @@
|
216 |
|
|
217 |
|
self.last_message = message |
218 |
|
|
219 |
|
def run(self): |
220 |
|
""" |
221 |
|
Reads data from the queue and tweets a message if it sees an ALARM or IMGPATH message |
222 |
|
""" |
223 |
|
while True: |
224 |
|
d = self.getq() |
225 |
|
|
226 |
|
if 'ALARM' in str(d): |
227 |
|
self._when_alarm(d) |
228 |
|
|
229 |
|
elif 'IMGPATH' in str(d): |
230 |
|
self._when_img(d) |
231 |
|
|
rsudp/c_telegram.py 1 location
|
@@ 157-168 (lines=12) @@
|
154 |
|
printM('Could not find image: %s' % (imgpath), sender=self.sender) |
155 |
|
|
156 |
|
|
157 |
|
def run(self): |
158 |
|
""" |
159 |
|
Reads data from the queue and sends a message if it sees an ALARM or IMGPATH message |
160 |
|
""" |
161 |
|
while True: |
162 |
|
d = self.getq() |
163 |
|
|
164 |
|
if 'ALARM' in str(d): |
165 |
|
self._when_alarm(d) |
166 |
|
|
167 |
|
elif 'IMGPATH' in str(d): |
168 |
|
self._when_img(d) |
169 |
|
|