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

Templates/views #145

Open
umer936 opened this issue Feb 13, 2024 · 7 comments
Open

Templates/views #145

umer936 opened this issue Feb 13, 2024 · 7 comments

Comments

@umer936
Copy link
Contributor

umer936 commented Feb 13, 2024

dereuromark-queue has nice templates to see the jobs. Is this something we want to have in cakephp/queue and they just haven't been made or is it intentional to keep the scope just for making it easier to use queuing methods and not having stuff like that?

@markstory
Copy link
Member

Having monitoring views/controllers sounds interesting to me. I don't think any have been added this far as nobody has brought it up.

@umer936
Copy link
Contributor Author

umer936 commented Feb 15, 2024

Sweet. I'll do it then.
https://github.com/umer936/queue

https://github.com/dereuromark/cakephp-queue

I'll likely take huge inspiration from yours @dereuromark if that's ok (unless you'd prefer to do it/have your name on the commits)

@dereuromark
Copy link
Member

All good, glad it inspires people

@kevindecapite
Copy link

@umer936 This would be a great value-add to the plugin. If I can contribute to what you're doing I'll certainly do so.

@umer936
Copy link
Contributor Author

umer936 commented Mar 13, 2024

@kevindecapite I have ideas in mind but haven't gotten to any implementation and it might be quite some time until I do so. Anyone feel free to get started.

image
^ this is using Mark's

Steps I see to take:

  1. I really like the Table schema from Mark's, so pulling from his migrations.
  2. Then mostly from his templates. (See screenshot)

Something significantly more, but might be way scope creep, is having it auto-setup multiple queues so that one can have the "Abort".
Basically on the system running Cake: 1 queue sending the job, and 1 queue with other messages.
On the receiving side (for me it's Python): it ingests from the job queue, and also checks the other queue. If the other queue contains the job ID currently being run, it kills.

@markstory
Copy link
Member

On the receiving side (for me it's Python): it ingests from the job queue, and also checks the other queue. If the other queue contains the job ID currently being run, it kills.

Would this be additional state that needs to be maintained by the Queue plugin?

@umer936
Copy link
Contributor Author

umer936 commented Mar 14, 2024

No, but it would have a terminate() to set QueuedJobs table entry to failed => true, failure_message => User aborted. or similar.

Right now it doesn't seem possible to override the 'queue' field from the config in the Controller. I end up array_mergeing it in the Controller to make a new config and using that before sending the job.

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

4 participants