gs.group.messages.topic.digest.send
¶
The gs.group.messages.topic.digest.send
product provides
the senddigest script. This script is used to send out
the daily digest of topics once a day, and is normally called by
cron(8).
The gs.group.topic.digest.send code does only triggers two web-hooks. Both these
hooks are provided by the
gs.group.messages.topic.digest.base
product [1].
Contents:
senddigest¶
Description¶
Usually senddigest is called by cron(8) once a day to send the daily digest of topics from GroupServer to all the members of all the groups whose email settings are set to digest.
Optional arguments¶
-
-h
,
--help
¶
Show this help message and exit
-
-c
<CONFIG>
,
--config
<CONFIG>
¶ The name of the GroupServer configuration file (default
INSTANCE_HOME/etc/gsconfig.ini
) that contains the token that will be used to authenticate the script when it tries to send the digests.
-
-i
<INSTANCE>
,
--instance
<INSTANCE>
¶ The identifier of the GroupServer instance configuration to use (default
default
).
-
-v
,
--verbose
¶
Provide verbose output. The default is to provide no output (no news is good news).
Returns¶
The script returns 0
on success, or non-zero on error. In the
case of an error, senddigest follows the convention specified
in /usr/include/sysexits.h
.
gs.group.topic.digest.send
code¶
The code for the script that sends out the digest works in two main stages: first it gets the list of groups, and then it sends a digest. Both raise the same exceptions.
The list of groups¶
The list of groups is retrieved using a web-hook that returns a
list of groups as a JSON blob. The DIGEST_GROUPS_URI
specifies the location of the web-hook, relative to the root of
the site, while the get_digest_groups()
function retrieves
the list of groups.
-
gs.group.messages.topic.digest.send.script.
DIGEST_GROUPS_URI
= u'/gs-group-messages-topic-digest-groups.html'¶ The URL of the web-hook that returns (as a JSON blob) the list of groups that need a digest.
Sending a digest¶
The digest is actually send by a web-hook. This hook is located
at SEND_DIGEST_URI
and is triggered by the
send_digest()
function.
-
gs.group.messages.topic.digest.send.script.
SEND_DIGEST_URI
= u'/gs-group-messages-topic-digest-send.html'¶ The URL of the web-hook used to send a digest to a group
Changelog¶
3.1.1 (2015-06-01)¶
- Fixing a link in the documentation
3.1.0 (2015-04-20)¶
- Added the
--verbose
(-v
) flag - Following the split between getting the list of groups, and sending a digest
- Moved the documentation to Read the Docs
3.0.0 (2015-02-26)¶
- Renaming the product gs.group.messages.topic.digest.send from
gs.group.messages.senddigest
2.1.0 (2014-03-26)¶
- Making the name of the configuration file an optional argument to the script
- Switching to Unicode literals
2.0.0 (2012-11-30)¶
Initial import. Prior to the creation of this product the trigger
for sending digests was part of
Products.XWFMailingListManager
.
Indices and tables¶
Resources¶
- Code repository: https://github.com/groupserver/gs.group.messages.topic.digest.send
- Questions and comments to http://groupserver.org/groups/development
- Report bugs at https://redmine.iopen.net/projects/groupserver
[1] | See <https://github.com/groupserver/gs.group.messages.topic.digest.base> |