[Koha-bugs] [Bug 25245] Add a plugin hook to allow running code on a nightly basis

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Wed Dec 9 17:42:00 CET 2020


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

--- Comment #54 from Martin Renvoize <martin.renvoize at ptfs-europe.com> ---
Firstly, this bug was all about adding the ability to just run a task added by
a plugin at regular intervals.. it was added to resolve the need to set up all
sorts of additional cron jobs for the various plugins out in the wild that
document 'when you install this plugin you also need to go on the server and
add x, y and z cron tasks'.  Yes, a task scheduler would be great, but I really
didn't want to wait another 10 years whilst people made up their mind on how to
implement one.

I wasn't even attempting to resolve the need for adding tasks to the FIFO task
queue... to me, that's a different process and bug entirely...

Task Schedular != Task Queue

As for the task queue, now I've looked at it.. I'm rather disappointed that
it's hardcoded to a list of tasks, doesn't allow for parallelism, doesn't offer
retries or failure states, doesn't even allow for multiple workers?  Perhaps I
was spoilt with Minion in previous projects.. personally I would have loved to
have simply adopted it.. I thought the biggest thing against it was that it
recommends the use or Mojo::Pg as the backend and we use MySQL.... what's the
difference in requiring people to install RabbitMQ vs requiring them to install
Postgres?... there is also a well maintained MySQL backend that implements a
clever form of PubSub to get around the fact that MySQL doesn't do pubsub
natively.


As for a simpler scheduler.. why not just keep a list of tasks and execution
times akin to cron in a table and query it every minute.. the exact same way
cron does... and leave FIFO tasks to the queue implementation we've now got.

-- 
You are receiving this mail because:
You are watching all bug changes.


More information about the Koha-bugs mailing list