Skip to content

Noisy "Cannot parse return type..." log warning on task error #479

Description

@paul-twelvelabs

On task error, task.AsyncTaskiqTask.get_result will emit "Cannot parse..." log warnings that are not really helpful especially considering detailed error information is available elsewhere. Moreover, the result both return_value=None which means serialization to non-None types will always fail.

Would it make sense to wrap that conditionally log only if the result does not an error? e.g.

current

except ValueError:
    logger.warning("Cannot parse return type into %s", self.return_type)

proposed

except ValueError:
    if not res.is_err:
        logger.warning("Cannot parse return type into %s", self.return_type)

--

Thanks for all the hard work! taskiq is great!

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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