Tuesday, July 5, 2016¶
I noticed that builds for Lino Noi on Travis are failing for a very stupid reason: because Lino Extensions Library has never been released to PyPI. So I now released version 1.0.0 of Lino Extensions Library. Changes for this project are together with The lino package and The lino_book package.
The project settings on drone.io were still configured for using
fab instad of
inv. Now they are failing (at least)
because the latest Lino is not released. But I leave this waiting
because I started working on #1017.
For #1017 we “just” want to extend Lino’s notification framework so that the actual sending of emails is done in a separate job.
notify.Notification.notifymethod should no longer call
lino.modlib.notify.modelsmust define a task which calls
send_emailon every unsent notification.
Register that task to be run every 10 seconds. The schedule package seems interesting for this.
Write a daemon command
linodwhich runs all scheduled tasks.
Since the last two items will probably be interesting for other
plugins as well, they should be in a central place (and not in the
lino.utils.daemoncommand which worked well for
watch_tim (until they migrated from TIM to Lino and no
longer needed to synchronize them).
But it needs to be converted from optparse to argparse.
New model mixin
lino.modlib.comments.models.Commentare the first usage.
New admin command
linod. On a development machine you simply run this in a separate terminal. On a production server this should be installed as a service (starting a new process every 10 seconds would probably cause a big server load).
I revised both the database structure and the API for the notification framework.
Which also resulted in a great progress for #932 (Make the comments system in Noi usable).
About #1022: I stumbled over the probabele explanation: I
guess that our observation was because bleach was not installed or
not active. See source code of
lino.modlib.comments.models.Comment.ALLOWED_TAGS because these
tags seem harmless.
I commited my changes to master and pushed them though some test suites are probably broken.