View | Details | Raw Unified | Return to bug 38104
Collapse All | Expand All

(-)a/C4/UsageStats.pm (-2 / +3 lines)
Lines 25-30 use JSON qw( decode_json encode_json ); Link Here
25
25
26
use Koha::Libraries;
26
use Koha::Libraries;
27
27
28
use constant MIN_INTERVAL_BETWEEN_RUNS => 2419200;    # 28 * 24 * 60 * 60 seconds
29
28
=head1 NAME
30
=head1 NAME
29
31
30
C4::UsageStats
32
C4::UsageStats
Lines 51-57 sub NeedUpdate { Link Here
51
    my $now = strftime( "%s", localtime );
53
    my $now = strftime( "%s", localtime );
52
54
53
    # Need to launch cron.
55
    # Need to launch cron.
54
    return 1 if $now - $lastupdated >= 2592000;
56
    return 1 if $now - $lastupdated > MIN_INTERVAL_BETWEEN_RUNS;
55
57
56
    # Data don't need to be updated
58
    # Data don't need to be updated
57
    return 0;
59
    return 0;
58
- 

Return to bug 38104