| 580 | return redirect("%s#activity" % self.object.get_absolute_url()) | |
| 593 | wait = self.wait_for_result | |
| 594 | if wait: | |
| 595 | try: | |
| 596 | result = task.get(timeout=wait, | |
| 597 | interval=min((wait / 5, .5))) | |
| 598 | except TimeoutError: | |
| 599 | logger.debug("Result didn't arrive in %ss", | |
| 600 | self.wait_for_result, exc_info=True) | |
| 601 | except Exception as e: | |
| 602 | messages.error(request, _('Operation failed.')) | |
| 603 | logger.debug("Operation failed.", exc_info=True) | |
| 604 | result = e | |
| 605 | else: | |
| 606 | messages.success(request, _('Operation succeeded.')) | |
| 607 | if result is None: | |
Please
register
or
sign in
to reply
|
||