Check for updates
(self)
| 143 | @Expose |
| 144 | @threaded |
| 145 | def update(self): |
| 146 | """ |
| 147 | Check for updates |
| 148 | """ |
| 149 | if self._update() != 2 or not self.config.get('autorestart'): |
| 150 | return |
| 151 | |
| 152 | if not self.pyload.api.statusDownloads(): |
| 153 | self.pyload.api.restart() |
| 154 | else: |
| 155 | self.log_warning(_("pyLoad restart scheduled"), |
| 156 | _("Downloads are active, pyLoad restart postponed once the download is done")) |
| 157 | self.pyload.api.pauseServer() |
| 158 | self.do_restart = True |
| 159 | |
| 160 | def _update(self): |
| 161 | newversion = self.server_response(0) |
no test coverage detected