Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can I contributre an inline admin widget to view the actual task result when results=True is configured? #151

Open
pirate opened this issue Sep 10, 2024 · 0 comments

Comments

@pirate
Copy link

pirate commented Sep 10, 2024

It seems like a core feature that's missing right now. I want users to be able to see the actual task input arguments, dotted import path of the task handler function + source code file location, and its returned result value (as long as it's still available in the huey results store).

Obviously not everyone has result storing enabled, so it would be behind several conditionals that check:

  • is a result store available
  • is the task still present in the result store
  • has the task produced any output yet

If all are true, then we can display the result inline in Admin widget with a custom render function that handles producing different html depending on its type. To start with we could just render a simple str(result) representation.

We could also use django-jsonform as an optional extra dependency, their stuff is great for rendering arbitrary JSON-able objects nicely in the admin: https://github.com/bhch/django-jsonform

Related:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant