getredash / redash

Make Your Company Data Driven. Connect to any data source, easily visualize, dashboard and share your data.
http://redash.io/
BSD 2-Clause "Simplified" License
26.49k stars 4.39k forks source link

Redash ver9 rq err, “2 positional arguments but 3 were given” #5530

Open ilgwonPark2 opened 3 years ago

ilgwonPark2 commented 3 years ago

From v8, I tried to migrate v9. Since celery is removed and RQ is added, I updated supervisor conf however, worker doesn’t work as it expected

I think it comes from RQ, but I'm using 1.1.0 ver Can I get advice to solve this problem?

[inet_http_server]
port = 127.0.0.1:9001

[program:redash_server]
command=/opt/redash/current/bin/run gunicorn -b 127.0.0.1:5000 --name redash -w 4 --max-requests 1000 redash.wsgi:app
directory=/opt/redash/current
process_name=redash_server
user=redash
numprocs=1
autostart=true
autorestart=true

[rpcinterface:supervisor]
supervisor.rpcinterface_factory = supervisor.rpcinterface:make_main_rpcinterface

[program:scheduler]
command=/opt/redash/current/bin/run /opt/redash/current/manage.py rq scheduler
process_name=%(program_name)s-%(process_num)s
user=redash
numprocs=1
directory=/opt/redash/current
stopsignal=TERM
autostart=true
autorestart=true

[program:worker_adhoc]
command=/opt/redash/current/bin/run /opt/redash/current/manage.py rq worker queries
process_name=%(program_name)s-%(process_num)s
user=redash
numprocs=3
directory=/opt/redash/current
stopsignal=TERM
autostart=true
autorestart=true

[program:worker]
command=/opt/redash/current/bin/run /opt/redash/current/manage.py rq worker emails default
process_name=%(program_name)s-%(process_num)s
user=redash
numprocs=1
directory=/opt/redash/current
stopsignal=TERM
autostart=true
autorestart=true

[eventlistener:worker_healthcheck]
serverurl=AUTO
command=/opt/redash/current/bin/run /opt/redash/current/manage.py rq healthcheck
events=TICK_60

worker error

==> /var/log/supervisor/worker-0-stderr---supervisor-r4461dcp.log <==
 * Tip: There are .env or .flaskenv files present. Do "pip install python-dotenv" to use them.
[2021-07-07 11:42:35,195][PID:24749][INFO][rq.worker] Worker rq:worker:cc7abf1886a347aba8cf1201faeb4de8: started, version 1.5.0
[2021-07-07 11:42:35,195][PID:24749][INFO][rq.worker] *** Listening on emails, default...
[2021-07-07 11:42:35,199][PID:24749][INFO][rq.worker] default: 472d7087-2be7-471d-b4ff-011161970747
[2021-07-07 11:42:35,206][PID:24749][ERROR][rq.worker] Worker rq:worker:cc7abf1886a347aba8cf1201faeb4de8: found an unhandled exception, quitting...
Traceback (most recent call last):
  File "/usr/local/lib/python3.7/dist-packages/rq/worker.py", line 552, in work
    self.execute_job(job, queue)
  File "/opt/redash/redash-9.0.0-beta/redash/tasks/worker.py", line 56, in execute_job
    super().execute_job(job, queue)
  File "/usr/local/lib/python3.7/dist-packages/rq/worker.py", line 776, in execute_job
    self.monitor_work_horse(job, queue)
TypeError: monitor_work_horse() takes 2 positional arguments but 3 were given
[2021-07-07 11:42:35,263][PID:24772][INFO][rq.job.redash.tasks.alerts] job.func_name=redash.tasks.alerts.check_alerts_for_query job.id=472d7087-2be7-471d-b4ff-011161970747 Checking alert (101) of query 3401.

Technical details:

Redash Version: ver 9 Browser/OS: ubuntu 18

susodapop commented 3 years ago

Hi there, you shouldn't need to update any conf files for the upgrade. What steps did you follow?

The upgrade instructions are found here.