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

Fix or remove the /api/queues endpoint #26

Closed
msm-code opened this issue Jan 21, 2021 · 0 comments · Fixed by #28
Closed

Fix or remove the /api/queues endpoint #26

msm-code opened this issue Jan 21, 2021 · 0 comments · Fixed by #28
Assignees

Comments

@msm-code
Copy link
Contributor

Looks like this endpoint doesn't work anymore:

ERROR:karton.dashboard.app:Exception on /api/queues [GET]
Traceback (most recent call last):
  File "/usr/local/lib/python3.7/site-packages/flask/app.py", line 2446, in wsgi_app
    response = self.full_dispatch_request()
  File "/usr/local/lib/python3.7/site-packages/flask/app.py", line 1951, in full_dispatch_request
    rv = self.handle_user_exception(e)
  File "/usr/local/lib/python3.7/site-packages/flask/app.py", line 1820, in handle_user_exception
    reraise(exc_type, exc_value, tb)
  File "/usr/local/lib/python3.7/site-packages/flask/_compat.py", line 39, in reraise
    raise value
  File "/usr/local/lib/python3.7/site-packages/flask/app.py", line 1949, in full_dispatch_request
    rv = self.dispatch_request()
  File "/usr/local/lib/python3.7/site-packages/flask/app.py", line 1935, in dispatch_request
    return self.view_functions[rule.endpoint](**req.view_args)
  File "/usr/local/lib/python3.7/site-packages/karton/dashboard/app.py", line 196, in get_queues_api
    for identity, queue in state.queues.items()
  File "/usr/local/lib/python3.7/site-packages/karton/dashboard/app.py", line 196, in <dictcomp>
    for identity, queue in state.queues.items()
  File "/usr/local/lib/python3.7/site-packages/karton/dashboard/app.py", line 100, in to_dict
    "tasks": sorted(tasks, key=lambda t: t.last_update, reverse=True),
  File "/usr/local/lib/python3.7/site-packages/karton/dashboard/app.py", line 100, in <lambda>
    "tasks": sorted(tasks, key=lambda t: t.last_update, reverse=True),
AttributeError: 'str' object has no attribute 'last_update'

It went undetected pretty long, so I assume it's not used by anyone. We can probably safely remove it instead of fixing it (but I have no hard stance on this).

I wish we could e2e test this, but this looks like a pain to setup test environment for.

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

Successfully merging a pull request may close this issue.

2 participants