[Koha-bugs] [Bug 17690] New: Use task scheduler daemon
bugzilla-daemon at bugs.koha-community.org
bugzilla-daemon at bugs.koha-community.org
Tue Nov 29 05:33:59 CET 2016
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17690
Bug ID: 17690
Summary: Use task scheduler daemon
Change sponsored?: ---
Product: Koha
Version: master
Hardware: All
OS: All
Status: NEW
Severity: enhancement
Priority: P5 - low
Component: Task Scheduler
Assignee: gmcharlt at gmail.com
Reporter: dcook at prosentient.com.au
QA Contact: testopia at bugs.koha-community.org
As part of my work for #10662, I've been building a task scheduler daemon,
which will schedule and execute tasks in the background.
Originally, I was going to include it in that patch, but it's a hefty daemon,
so I've decided to open up a separate ticket.
There are a few existing bugs that talk about task schedulers (#1993, #14712,
#13813, #3935), but nothing has really been proposed yet.
So I wrote my own task scheduler daemon, which I've dubbed Icarus. The master
process is event-driven using POE with a single thread, and tasks are executed
in child processes using POE::Wheel::Run. You can communicate with Icarus by
sending JSON requests over a Unix socket.
At the moment, I've only written tasks to download and upload OAI-PMH documents
to a API (defined in #10662), but you could use it for anything.
In terms of scheduling, it uses specific timestamps, and you can set up
periodic tasks by defining the number of seconds to wait until you execute the
task again. In the future, I'd like to add a cron-style syntax, which allows
you to have a more granular control over the periodicity.
It's similar in concept to Celery (http://www.celeryproject.org/), although
Celery is written in Python and much more mature. I haven't found a Perl-based
project which is as full-featured. While FIFO job queues abound, a periodic
task scheduler seems quite a bit more rare.
I'm going to post the API to #10662 soon, and after that I'll look at posting
Icarus here. I still have more unit tests to write for it in the meantime.
--
You are receiving this mail because:
You are watching all bug changes.
More information about the Koha-bugs
mailing list