https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35920

--- Comment #32 from David Cook <[email protected]> ---
(In reply to Tomás Cohen Arazi (tcohen) from comment #31)
> Compare adding a column `run_after` of type timestamp with adding yet
> another subsystem to maintain. We need to match timezones, I need to sleep
> now, this is a great chat

I knew you were going to say that ;).

But I think that you're still conflating the task scheduler, message passing,
and task/job workers. They're all separate functions.

We could add a "run_at" column to background_jobs. We then have a task
scheduler poll the database for any jobs where run_at <= now(). 

Once we've got all the jobs scheduled to be run, we then need to pass the
message. If we use the DB style, we can just launch our child worker processes
directly so the message is passed in memory (or send them via a Unix socket to
a worker process). If we use the RabbitMQ style, we can send the messages to
the broker, and the worker processes consume the messages. 

Currently, we don't have a task scheduler. With RabbitMQ, we just pass the
message immediately and the job worker consumes it immediately. With the DB
model, we wait for the daemon to pick up the job from the DB and pass the
message through its own memory.

--

Do you see that regardless of whether or not you have RabbitMQ, adding "run_at"
would essentially create a new subsystem?

-- 
You are receiving this mail because:
You are the assignee for the bug.
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[email protected]
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/

Reply via email to