1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
|
# File 'modules/profile/manifests/mediawiki/maintenance/translationnotifications.pp', line 1
class profile::mediawiki::maintenance::translationnotifications(
Stdlib::Unixpath $helmfile_defaults_dir = lookup('profile::kubernetes::deployment_server::global_config::general_dir', {default_value => '/etc/helmfile-defaults'}),
) {
# Should there be systemd timer entry for each wiki,
# or just one which runs the scripts which iterates over
# selected set of wikis?
$team = 'language_and_product_localization'
# MetaWiki
profile::mediawiki::periodic_job { 'translationnotifications-metawiki':
command => '/usr/local/bin/mwscript extensions/TranslationNotifications/scripts/DigestEmailer.php --wiki metawiki',
interval => 'Mon 10:00',
cron_schedule => '0 10 * * MON',
kubernetes => true,
team => $team,
script_label => 'DigestEmailer.php-metawiki',
description => 'send email notification to translators on regular intervals on metawiki.',
helmfile_defaults_dir => $helmfile_defaults_dir,
ttlsecondsafterfinished => 1209600, # 2 weeks
}
profile::mediawiki::periodic_job { 'translationnotifs-unsubinactiveusers-metawiki':
command => '/usr/local/bin/mwscript extensions/TranslationNotifications/maintenance/UnsubscribeInactiveUsers.php --wiki metawiki --days 365 --really',
interval => '*-01,04,07,10-02 02:00:00',
cron_schedule => '0 2 2 */3 *',
kubernetes => true,
team => $team,
script_label => 'UnsubscribeInactiveUsers.php',
description => 'Unsubscribe inactive translator users on metawiki once a quarter.',
helmfile_defaults_dir => $helmfile_defaults_dir,
migration_title => 'translationnotifications-unsubscribeinactiveusers-metawiki',
ttlsecondsafterfinished => 10368000, # 4 months
}
# MediaWiki
profile::mediawiki::periodic_job { 'translationnotifications-mediawikiwiki':
command => '/usr/local/bin/mwscript extensions/TranslationNotifications/scripts/DigestEmailer.php --wiki mediawikiwiki',
interval => 'Mon 10:05',
cron_schedule => '05 10 * * MON',
kubernetes => true,
team => $team,
script_label => 'DigestEmailer.php-mediawikiwiki',
description => 'send email notification to translators on regular intervals on mediawikiwiki.',
helmfile_defaults_dir => $helmfile_defaults_dir,
ttlsecondsafterfinished => 1209600, # 2 weeks
}
profile::mediawiki::periodic_job { 'translationnotifs-unsubinactiveuser-mediawikiwiki':
command => '/usr/local/bin/mwscript extensions/TranslationNotifications/maintenance/UnsubscribeInactiveUsers.php --wiki mediawikiwiki --days 365 --really',
interval => '*-01,04,07,10-02 03:30:00',
cron_schedule => '30 3 2 */3 *',
kubernetes => true,
team => $team,
script_label => 'UnsubscribeInactiveUsers.php',
description => 'Unsubscribe inactive translator users on mediawikiwiki once a quarter.',
helmfile_defaults_dir => $helmfile_defaults_dir,
migration_title => 'translationnotifications-unsubscribeinactiveusers-mediawikiwiki',
ttlsecondsafterfinished => 10368000, # 4 months
}
# Incubator
profile::mediawiki::periodic_job { 'translationnotifs-unsubinactiveuser-incubator':
command => '/usr/local/bin/mwscript extensions/TranslationNotifications/maintenance/UnsubscribeInactiveUsers.php --wiki incubatorwiki --days 365 --really',
interval => '*-01,04,07,10-02 04:15:00',
cron_schedule => '15 4 2 */3 *',
kubernetes => true,
team => $team,
script_label => 'UnsubscribeInactiveUsers.php',
description => 'Unsubscribe inactive translator users on incubatorwiki once a quarter.',
helmfile_defaults_dir => $helmfile_defaults_dir,
migration_title => 'translationnotifications-unsubscribeinactiveusers-incubator',
ttlsecondsafterfinished => 10368000, # 4 months
}
# Wikimania
profile::mediawiki::periodic_job { 'translationnotifs-unsubinactiveuser-wikimania':
command => '/usr/local/bin/mwscript extensions/TranslationNotifications/maintenance/UnsubscribeInactiveUsers.php --wiki wikimaniawiki --days 365 --really',
interval => '*-01,04,07,10-02 05:00:00',
cron_schedule => '0 5 2 */3 *',
kubernetes => true,
team => $team,
script_label => 'UnsubscribeInactiveUsers.php',
description => 'Unsubscribe inactive translator users on wikimaniawiki once a quarter.',
helmfile_defaults_dir => $helmfile_defaults_dir,
migration_title => 'translationnotifications-unsubscribeinactiveusers-wikimania',
ttlsecondsafterfinished => 10368000, # 4 months
}
# Commons
profile::mediawiki::periodic_job { 'translationnotifs-unsubinactiveuser-commons':
command => '/usr/local/bin/mwscript extensions/TranslationNotifications/maintenance/UnsubscribeInactiveUsers.php --wiki commonswiki --days 365 --really',
interval => '*-01,04,07,10-02 05:30:00',
cron_schedule => '30 5 2 */3 *',
kubernetes => true,
team => $team,
script_label => 'UnsubscribeInactiveUsers.php',
description => 'Unsubscribe inactive translator users on commonswiki once a quarter.',
helmfile_defaults_dir => $helmfile_defaults_dir,
migration_title => 'translationnotifications-unsubscribeinactiveusers-commons',
ttlsecondsafterfinished => 10368000, # 4 months
}
}
|