| 156 | |
| 157 | #http caller thread |
| 158 | class HTTPThread(threading.Thread): |
| 159 | def run(self): |
| 160 | try: |
| 161 | while flag<2: |
| 162 | code=httpcall(url) |
| 163 | if (code==500) & (safe==1): |
| 164 | set_flag(2) |
| 165 | except Exception, ex: |
| 166 | pass |
| 167 | |
| 168 | # monitors http threads and counts requests |
| 169 | class MonitorThread(threading.Thread): |