Defined Type: wikistats::job::update

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

Overview

a timer (job) to update a wikistats table

Parameters:

  • project (String) (defaults to: $name)
  • hour (Integer) (defaults to: 0)
  • minute (Integer) (defaults to: 0)
  • 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
# File 'modules/wikistats/manifests/job/update.pp', line 2

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

    systemd::timer::job { "wikistats-update-${name}":
        ensure          => $ensure,
        user            => 'wikistatsuser',
        description     => "pull fresh numbers for table ${name}",
        command         => "/usr/bin/php /usr/lib/wikistats/update.php ${project}",
        logging_enabled => true,
        logfile_basedir => '/var/log/wikistats/',
        logfile_name    => "update-${name}.log",
        interval        => {'start' => 'OnCalendar', 'interval' => "*-*-* ${hour}:${minute}:00"},
    }

}