Datahenge / btu

Background Tasks Unleashed: A Frappe Framework application for Task Scheduling and Automation.
MIT License
46 stars 19 forks source link

Recreate equivalent of RQ Dashboard/Monitor inside BTU #2

Open brian-pond opened 2 years ago

brian-pond commented 2 years ago

Situation

Python RQ does not ship with a GUI. To fully understand the RQ status (including errors :astonished: ), 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:

Suggestion

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

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.

brian-pond commented 7 months ago

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