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

SAQ Web #39

Open
PanagiotisS opened this issue Nov 6, 2024 · 0 comments
Open

SAQ Web #39

PanagiotisS opened this issue Nov 6, 2024 · 0 comments

Comments

@PanagiotisS
Copy link

Hello,

at the current state the web ui web_enabled=True, is not functioning (or at least the same as saq).

There are two issues.

  1. The http://127.0.0.1:8000/saq/queues/default does not show the jobs. In order to do so we need to do the following change,

https://github.com/cofin/litestar-saq/blob/main/litestar_saq/controllers.py#L68

-          return {"queue": await queue.info()}
+          return {"queue": await queue.info(jobs=True)}

The respective code in saq is https://github.com/tobymao/saq/blob/f7c5d9d9f4772b9db741a7507a2843e1134dd5a7/saq/web/starlette.py#L67

  1. The job info api does not work.

https://github.com/cofin/litestar-saq/blob/main/litestar_saq/controllers.py#L18

-    job = await queue._get_job_by_id(job_id)  # noqa: SLF001
+    job = await queue.job(job_id)  # noqa: SLF001

The respective code in saq is https://github.com/tobymao/saq/blob/f7c5d9d9f4772b9db741a7507a2843e1134dd5a7/saq/web/starlette.py#L109

Thank you and best wishes

P.S. There is also the issue that http://127.0.0.1:8000/saq does not work and needs to be http://127.0.0.1:8000/saq/ or in opposite manner http://127.0.0.1:8000/saq/queues/default works but http://127.0.0.1:8000/saq/queues/default/ does not, but that's upstream issue with the way routes regex is constructed.

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

No branches or pull requests

1 participant