Issue Summary
Scheduled query not working in the latest preview Docker Image (redash/redash:preview).
Steps to Reproduce
redash_scheduled_worker_1
has error:
[2021-03-27 07:27:06,319][PID:520][ERROR][rq.worker] AttributeError: 'NoneType' object has no attribute 'id'
Traceback (most recent call last):
File "/usr/local/lib/python3.7/site-packages/rq/worker.py", line 934, in perform_job
rv = job.perform()
File "/usr/local/lib/python3.7/site-packages/rq/job.py", line 686, in perform
self._result = self._execute()
File "/usr/local/lib/python3.7/site-packages/rq/job.py", line 692, in _execute
return self.func(*self.args, **self.kwargs)
File "/app/redash/tasks/queries/execution.py", line 288, in execute_query
scheduled_query_id is not None,
File "/app/redash/tasks/queries/execution.py", line 175, in __init__
models.scheduled_queries_executions.update(self.query_model.id)
AttributeError: 'NoneType' object has no attribute 'id'
Traceback (most recent call last):
File "/usr/local/lib/python3.7/site-packages/rq/worker.py", line 934, in perform_job
rv = job.perform()
File "/usr/local/lib/python3.7/site-packages/rq/job.py", line 686, in perform
self._result = self._execute()
File "/usr/local/lib/python3.7/site-packages/rq/job.py", line 692, in _execute
return self.func(*self.args, **self.kwargs)
File "/app/redash/tasks/queries/execution.py", line 288, in execute_query
scheduled_query_id is not None,
File "/app/redash/tasks/queries/execution.py", line 175, in __init__
models.scheduled_queries_executions.update(self.query_model.id)
AttributeError: 'NoneType' object has no attribute 'id'
If I revert this commit (Reset failure counter on adhoc success (#5394) · getredash/redash@9fdf1f3 · GitHub), it works again.
Technical details:
- Redash Version: Version: 9.0.0-beta (44178d99)
- Browser/OS: Chrome
- How did you install Redash: Docker