Puppet Class: snapshot::systemdjobs::commonsdumps::json

Defined in:
modules/snapshot/manifests/systemdjobs/commonsdumps/json.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
23
24
25
26
27
28
# File 'modules/snapshot/manifests/systemdjobs/commonsdumps/json.pp', line 1

class snapshot::systemdjobs::commonsdumps::json(
    $user      = undef,
    $filesonly = false,
) {
    # functions for wikibase json dumps, with values specific to Commons
    file { '/usr/local/bin/commonsjson_functions.sh':
        mode   => '0755',
        owner  => 'root',
        group  => 'root',
        source => 'puppet:///modules/snapshot/systemdjobs/wikibase/commonsjson_functions.sh',
    }

    $scriptpath = '/usr/local/bin/dumpwikibasejson.sh'
    if !$filesonly {
        # project: commons, dump type: all, entities to be dumped: mediainfo
        systemd::timer::job { 'commonsjson-dump':
            ensure             => present,
            description        => 'Regular jobs to build json snapshot of commons structured data',
            user               => $user,
            monitoring_enabled => false,
            send_mail          => true,
            environment        => {'MAILTO' => 'ops-dumps@wikimedia.org'},
            command            => "${scriptpath} -p commons -d mediainfo -e mediainfo -E --ignore-missing",
            interval           => {'start' => 'OnCalendar', 'interval' => 'Mon *-*-* 3:15:0'},
            require            => File[$scriptpath],
        }
    }
}