mirror of https://github.com/zulip/zulip.git
soft-deactivation: Add cron job for weekly soft deactivating users.
This commit is contained in:
parent
9d7e23c100
commit
b232563e12
|
@ -0,0 +1,6 @@
|
|||
SHELL=/bin/bash
|
||||
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
|
||||
USER=zulip
|
||||
|
||||
# Cron job to soft deactivate long term idle users weekly.
|
||||
0 5 * * 7 zulip /home/zulip/deployments/current/manage.py soft_activate_deactivate_users -d >/dev/null
|
|
@ -44,4 +44,13 @@ class zulip::app_frontend {
|
|||
mode => 644,
|
||||
source => "puppet:///modules/zulip/cron.d/restart-zulip",
|
||||
}
|
||||
|
||||
# Soft deactivate long term idle users weekly.
|
||||
file { "/etc/cron.d/soft-deactivate-users":
|
||||
ensure => file,
|
||||
owner => "root",
|
||||
group => "root",
|
||||
mode => 644,
|
||||
source => "puppet:///modules/zulip/cron.d/soft-deactivate-users",
|
||||
}
|
||||
}
|
||||
|
|
|
@ -42,6 +42,10 @@ class Command(ZulipBaseCommand):
|
|||
|
||||
def handle(self, *args, **options):
|
||||
# type: (*Any, **str) -> None
|
||||
if settings.STAGING:
|
||||
print('This is a Staging server. Suppressing management command.')
|
||||
sys.exit(0)
|
||||
|
||||
if options['realm_id']:
|
||||
realm = self.get_realm(options)
|
||||
filter_kwargs = {} # type: Dict[str, Realm]
|
||||
|
|
Loading…
Reference in New Issue