Puppet Class: snapshot::cron::shorturls

Defined in:
modules/snapshot/manifests/cron/shorturls.pp

Overview

Parameters:

  • user (Any) (defaults to: undef)
  • filesonly (Any) (defaults to: false)


1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
# File 'modules/snapshot/manifests/cron/shorturls.pp', line 1

class snapshot::cron::shorturls(
    $user      = undef,
    $filesonly = false,
) {
    $cronsdir = $snapshot::dumps::dirs::cronsdir
    $repodir = $snapshot::dumps::dirs::repodir
    $confsdir = $snapshot::dumps::dirs::confsdir

    if !$filesonly {
        systemd::timer::job { 'shorturls':
            ensure             => present,
            description        => 'Regular jobs to build snapshot of short urls and their targets',
            user               => $user,
            monitoring_enabled => false,
            send_mail          => true,
            environment        => {'MAILTO' => 'ops-dumps@wikimedia.org'},
            working_directory  => $repodir,
            command            => "/usr/bin/python3 onallwikis.py --wiki metawiki --configfile ${confsdir}/wikidump.conf.dumps:monitor  --filenameformat 'shorturls-{d}.gz' --outdir '${cronsdir}/shorturls' --script extensions/UrlShortener/maintenance/dumpURLs.php 'compress.zlib://{DIR}'",
            interval           => {'start' => 'OnCalendar', 'interval' => 'Mon *-*-* 8:5:0'},
        }
    }
}