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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Recreate equivalent of RQ Dashboard/Monitor inside BTU #2

Open
brian-pond opened this issue Jun 29, 2022 · 1 comment
Open

Recreate equivalent of RQ Dashboard/Monitor inside BTU #2

brian-pond opened this issue Jun 29, 2022 · 1 comment
Assignees
Labels
enhancement New feature or request

Comments

@brian-pond
Copy link
Contributor

brian-pond commented Jun 29, 2022

Situation

Python RQ does not ship with a GUI. To fully understand the RQ status (including errors 馃槻 ), there are only a few options:

  1. Inspect the Redis database using CLI tools:

    • redis-cli is a possibility. However, a lot of RQ data is pickled. It cannot be deciphered by a human.
    • The built-in rq CLI is too simplistic. It has a few commands. But nothing that gives administrators the insight and depth needed to troubleshoot.
  2. Install a third-party GUI tool, that knows how to read RQ data from Redis.

I've used both of these GUI tools. They are nice. However, they introduce headaches:

  • More web software to install and maintain. Sure, Docker might help isolate it. But that assumes you have Docker on your Production web server. And also assumes you're familiar and comfortable with configuring and maintaining Docker.
  • Another subdomain to register.
  • Another website to add to your Reverse Proxy.
  • More usernames and passwords to remember (you don't want strange humans examining/editing your RQ)

Suggestion

Even without BTU, Frappe Framework relies heavily on Python RQ. It's a very important component of the full stack:

  • Every call to frappe.enqueue needs it.
  • Scheduled Job Types need it.

So. Why should we install more software, when Frappe is already a web server with python-rq installed? Instead, why not just make a new Web Page that queries the Python RQ, and shows the data?

Just like what RQ Dashboard and RQ Monitor are doing. But using Frappe instead of Flask.

Goals

In the BTU App, create various Web Pages that do exactly the same thing as RQ Dashboard and RQ Monitor.

  • Show the Jobs that are in the Redis database, by status: Finished, Queued, Error, Started, etc.
  • Show all the details about 1 Job, including the pickled results, standard output and standard error, etc.
  • Create a button to delete a Job.
  • Create a button to delete all Failed Jobs.
  • Create a button to purge the Queues.
@brian-pond brian-pond added the enhancement New feature or request label Jun 29, 2022
@brian-pond brian-pond self-assigned this Jun 29, 2022
@brian-pond
Copy link
Contributor Author

Update: With the release of ERPNext v15, there is now a new virtual DocType "RQ Job". This probably fulfills 80% of my requirements above?

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

No branches or pull requests

1 participant