| 378 | |
| 379 | #http caller thread |
| 380 | class HTTPThread(threading.Thread): |
| 381 | def run(self): |
| 382 | try: |
| 383 | while flag<2: |
| 384 | code=httpcall(url) |
| 385 | if (code==500) & (safe==1): |
| 386 | set_flag(2) |
| 387 | except Exception, ex: |
| 388 | pass |
| 389 | |
| 390 | # monitors http threads and counts requests |
| 391 | class MonitorThread(threading.Thread): |