Wubot::Plugin::SQLite - monitor results of SQLite queries
version 0.2.5
~/wubot/config/plugins/SQLite/notifyqueue.yaml --- delay: 5m dbfile: /Users/wu/wubot/sqlite/notify.sql statements: - SELECT count(*) AS unseen FROM notifications WHERE seen IS NULL
This plugin executes a sqlite query and sends a message with the results.
I find it useful to monitor the length of my notification queues. The first example monitors the total number of items in the queue that are unread.
The next example selects the number of items that were added to the queue in the last 24 hours:
~/wubot/config/plugins/SQLite/notify-day.yaml --- delay: 5m dbfile: /Users/wu/wubot/sqlite/notify.sql statements: - SELECT count(*) AS day FROM notifications WHERE lastupdate > ( select strftime('%s','now','-24 hours') )
The standard monitor check() method.
To install Wubot, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Wubot
CPAN shell
perl -MCPAN -e shell install Wubot
For more information on module installation, please visit the detailed CPAN module installation guide.