queue icon indicating copy to clipboard operation
queue copied to clipboard

Templates/views

Open umer936 opened this issue 1 year ago • 7 comments
trafficstars

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?

umer936 avatar Feb 13 '24 21:02 umer936

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

markstory avatar Feb 15 '24 01:02 markstory

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)

umer936 avatar Feb 15 '24 15:02 umer936

All good, glad it inspires people

dereuromark avatar Feb 15 '24 15:02 dereuromark

@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.

kevindecapite avatar Feb 19 '24 14:02 kevindecapite

@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.

umer936 avatar Mar 13 '24 14:03 umer936

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?

markstory avatar Mar 14 '24 02:03 markstory

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.

umer936 avatar Mar 14 '24 14:03 umer936