Defined Type: wikistats::job::import

Defined in:
modules/wikistats/manifests/job/import.pp

Overview

a timer (job) to import a list of wikis into a wikistats table

Parameters:

  • weekday (String)
  • project (String) (defaults to: $name)
  • hour (Integer) (defaults to: 11)
  • minute (Integer) (defaults to: 11)
  • ensure (Wmflib::Ensure) (defaults to: 'present')


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

define wikistats::job::import(
    String $weekday,
    String $project = $name,
    Integer $hour = 11,
    Integer $minute = 11,
    Wmflib::Ensure $ensure = 'present',
){

    systemd::timer::job { "wikistats-import-${name}":
        ensure          => $ensure,
        user            => 'root',
        description     => "import a fresh list of wikis into table ${name}",
        command         => "/usr/local/bin/wikistats/import_${project}.sh",
        logging_enabled => true,
        logfile_basedir => '/var/log/wikistats/',
        logfile_name    => "import-${project}.log",
        send_mail       => true,
        environment     => {'MAILTO' => 'dzahn@wikimedia.org'},
        interval        => {'start' => 'OnCalendar', 'interval' => "${weekday} *-*-* ${hour}:${minute}:00"},
    }
}