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

Rq dashboard extension #1

Open
wants to merge 19 commits into
base: master
from

Conversation

Projects
None yet
3 participants
@ibrahim12
Copy link

commented Jul 10, 2019

Feature Improvements

  • Show state tables for queue (running, pending, finished) along side job stop/cancel/requeue/delete option.
  • Option to show jobs in reverse order
  • Hide workers by default
  • Hide Failed jobs traceback by default and toggle on click

Code Improvements

  • Refactored jinja2 templates for re-using views.
@lucasnad27
Copy link

left a comment

In general, I don't like having a bunch of "random" developer code living in the dev_scripts directory. It's not a well understood practice/pattern. If you need to add helpers for local dev (e.g., boot worker) it should go into the Makefile. You could also make the case for putting it into the fabfile.py

@@ -0,0 +1,21 @@
from redis import Redis

This comment has been minimized.

Copy link
@lucasnad27

lucasnad27 Jul 10, 2019

this should be part of the test suite, not hidden away in dev_scripts

This comment has been minimized.

Copy link
@ibrahim12

ibrahim12 Jul 12, 2019

Author

I will make a fab script

This comment has been minimized.

Copy link
@ibrahim12

ibrahim12 Jul 13, 2019

Author

removed


# create_n_jobs_on_queue(10, default, functions.func_default)
create_n_jobs_on_queue(10, new, functions.func_default)
# create_n_jobs_on_queue(10, new, functions.func_with_exception)

This comment has been minimized.

Copy link
@lucasnad27

lucasnad27 Jul 10, 2019

No commented out code please

@@ -19,3 +19,5 @@
DEBUG = False
RQ_DASHBOARD_WEB_BACKGROUND = "black"
RQ_DASHBOARD_DELETE_JOBS = False

RQ_DASHBOARD_JOB_SORT_ORDER = '-age'

This comment has been minimized.

Copy link
@lucasnad27

lucasnad27 Jul 10, 2019

Nice setting here!

@@ -6,11 +6,15 @@ var url_for = function(name, param) {
else if (name == 'workers') { url += 'workers.json'; }
else if (name == 'cancel_job') { url += 'job/' + encodeURIComponent(param) + '/cancel'; }
else if (name == 'requeue_job') { url += 'job/' + encodeURIComponent(param) + '/requeue'; }
else if (name == 'requeue_finished_job') { url += 'job/' + encodeURIComponent(param) + '/finished/requeue'; }

This comment has been minimized.

Copy link
@lucasnad27

lucasnad27 Jul 10, 2019

Why would we want to requeue a finished job?

This comment has been minimized.

Copy link
@ibrahim12

ibrahim12 Jul 10, 2019

Author

Running that job again ? 🤔
Actually that would be clone job, not requeue.

$tbody.on('click', '[data-role=cancel-job-btn]', function(e) {
e.preventDefault();
e.stopPropagation();
{{ job_table.render_js(queue.name, 'pending', page if (state == 'pending' or queue_name == 'failed') else 1) }}

This comment has been minimized.

Copy link
@lucasnad27

lucasnad27 Jul 10, 2019

Stopping my review here as I need to attend to other items. but will continue reviewing later. I want to give you my feedback up to this point.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.