run all task which have to be done (this is for repetivive call by core)
(self)
| 130 | |
| 131 | |
| 132 | def work(self): |
| 133 | """run all task which have to be done (this is for repetivive call by core)""" |
| 134 | try: |
| 135 | self.tryReconnect() |
| 136 | except Exception, e: |
| 137 | self.log.error(_("Reconnect Failed: %s") % str(e) ) |
| 138 | self.reconnecting.clear() |
| 139 | if self.core.debug: |
| 140 | print_exc() |
| 141 | self.checkThreadCount() |
| 142 | |
| 143 | try: |
| 144 | self.assignJob() |
| 145 | except Exception, e: |
| 146 | self.log.warning("Assign job error", e) |
| 147 | if self.core.debug: |
| 148 | print_exc() |
| 149 | |
| 150 | sleep(0.5) |
| 151 | self.assignJob() |
| 152 | #it may be failed non critical so we try it again |
| 153 | |
| 154 | if (self.infoCache or self.infoResults) and self.timestamp < time(): |
| 155 | self.infoCache.clear() |
| 156 | self.infoResults.clear() |
| 157 | self.log.debug("Cleared Result cache") |
| 158 | |
| 159 | #---------------------------------------------------------------------- |
| 160 | def tryReconnect(self): |
nothing calls this directly
no test coverage detected