| 127 | |
| 128 | #http caller thread |
| 129 | class HTTPThread(threading.Thread): |
| 130 | def run(self): |
| 131 | try: |
| 132 | while flag<2: |
| 133 | code=httpcall(url) |
| 134 | if (code==500) & (safe==1): |
| 135 | set_flag(2) |
| 136 | except Exception, ex: |
| 137 | pass |
| 138 | |
| 139 | # monitors http threads and counts requests |
| 140 | class MonitorThread(threading.Thread): |