gs.profile.status.send
Documentation¶
This product provides the script that sends the Profile-status notification (What is happening in your groups) to the members of a GroupServer instance.
Contents:
sendprofile¶
Description¶
sendprofile sends the monthly profile-status notification out to all the people with profiles in a GroupServer instance. Normally it is called by cron(8).
Optional Arguments¶
-
-h
,
--help
¶
Show a 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 add the email to the site.
-
-i
<INSTANCE>
,
--instance
<INSTANCE>
¶ The identifier of the GroupServer instance configuration to use (default
default
).
-
-v
,
--verbose
¶
Turn on verbose output (default is silent).
-
-t
<TIME>
,
--throttle
<TIME>
¶ The time (in seconds) to pause when the notifications is successfully sent (default
0
). For large sites sending the notification can be computationally expensive, and adding a throttle allows other requests to be processed by the server.
Returns¶
sendprofile returns
0
on success,130
if the user terminated the program (Control-c
), or- A value following the convention specified in
/usr/include/sysexits.h
.
Configuration file¶
The configuration for the sendprofile script is
handled by the gs.config
module [1]. It shares its
authentication with the smtp2gs
script [2].
[1] | See gs.config
<https://github.com/groupserver/gs.config> |
[2] | See gs.group.messages.add.smtp2gs
<https://github.com/groupserver/gs.group.messages.add.smtp2gs> |
gs.profile.status.send
Internals¶
The gs.profile.status.send
does not have a public API,
other than what is provided by the script itself. However, the
internals are documented below.
The script¶
The sendprofile script is provided by the module
script
. The main()
function takes the name of the
default configuration file a single argument, which is normally
supplied by buildout
when it generates the
sendprofile script from the entry point.
The list of people¶
-
gs.profile.status.send.script.
PROFILE_URI
= u'/gs-profile-status-members.html'¶ The URL of the web-hook that returns (as a JSON blob) the list of profile IDs
Sending the notification¶
-
gs.profile.status.send.script.
SEND_STATUS_URI
= u'/gs-profile-status-send.html'¶ The URL of the web-hook used to send a digest to a group
The script proper¶
-
gs.profile.status.send.script.
main
(configFileName=u'etc/gsconfig.ini')[source]¶ Send the profile status to all the members, using web-hooks
Parameters: configFileName (str) – The name of the configuration file.