| 205 | |
| 206 | #http caller thread |
| 207 | class HTTPThread(threading.Thread): |
| 208 | def run(self): |
| 209 | try: |
| 210 | while flag<2: |
| 211 | code=httpcall(url) |
| 212 | if (code==500) & (safe==1): |
| 213 | set_flag(2) |
| 214 | except Exception, ex: |
| 215 | pass |
| 216 | |
| 217 | # monitors http threads and counts requests |
| 218 | class MonitorThread(threading.Thread): |