Skip to content
This repository was archived by the owner on Apr 30, 2024. It is now read-only.
This repository was archived by the owner on Apr 30, 2024. It is now read-only.

Exception setting Async.result. #168

@andreleblanc-wf

Description

@andreleblanc-wf

When attempting to set the .result of an async, if async.executing is True, the call to .executing = True will raise an exception. That exception is caught in the final except clause, which attempts to set the result to an exception, which raises another exception because the Task isn't executing.

The relevant code starts here:
https://github.com/Workiva/furious/blob/master/furious/processors.py#L56

The solution would probably involve explicitly catching the NotExecutingError and doing something other than attempt to write it to the Async.result.

from https://jira.atl.workiva.net/browse/DS-3936

Traceback (most recent call last):
  File "third_party/webapp2-2.5.2/webapp2.py", line 1535, in __call__
    rv = self.handle_exception(request, response, e)
  File "third_party/webapp2-2.5.2/webapp2.py", line 1529, in __call__
    rv = self.router.dispatch(request, response)
  File "third_party/webapp2-2.5.2/webapp2.py", line 1278, in default_dispatcher
    return route.handler_adapter(request, response)
  File "third_party/webapp2-2.5.2/webapp2.py", line 1102, in __call__
    return handler.dispatch()
  File "third_party/webapp2-2.5.2/webapp2.py", line 572, in dispatch
    return self.handle_exception(e, self.app.debug)
  File "third_party/webapp2-2.5.2/webapp2.py", line 570, in dispatch
    return method(*args, **kwargs)
  File "external_libs/furious/handlers/webapp.py", line 28, in post
    self._handle_task()
  File "external_libs/furious/handlers/webapp.py", line 37, in _handle_task
    headers, self.request.body)
  File "external_libs/furious/handlers/__init__.py", line 38, in process_async_task
    run_job()
  File "external_libs/furious/processors.py", line 72, in run_job
    status=AsyncResult.ERROR)
  File "external_libs/furious/async.py", line 160, in result
    'The Async must be executing to set its result.')
NotExecutingError
NotExecutingError: The Async must be executing to set its result.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions