diff options
author | Matthew Somerville <matthew-github@dracos.co.uk> | 2018-05-11 19:57:49 +0100 |
---|---|---|
committer | Matthew Somerville <matthew-github@dracos.co.uk> | 2018-05-23 18:55:10 +0100 |
commit | eb58ad65f8b25be9dc4321ca5914ad1d89f8bf3a (patch) | |
tree | ff99b2e34567c149a9ecd17c800781c8e40ebb6c /bin | |
parent | df731c5a0ffccc434550ca4dd2ecace5287848fa (diff) |
Script to scrub old non-open reports.
Diffstat (limited to 'bin')
-rwxr-xr-x | bin/process-inactive-reports | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/bin/process-inactive-reports b/bin/process-inactive-reports new file mode 100755 index 000000000..3f133d11a --- /dev/null +++ b/bin/process-inactive-reports @@ -0,0 +1,40 @@ +#!/usr/bin/env perl + +use v5.14; +use warnings; + +BEGIN { + use File::Basename qw(dirname); + use File::Spec; + my $d = dirname(File::Spec->rel2abs($0)); + require "$d/../setenv.pl"; +} + +use Getopt::Long; +use FixMyStreet::Script::Inactive; +use Pod::Usage; + +my %h; +GetOptions(\%h, 'anonymize=i', 'verbose|v', 'help|h', 'dry-run|n'); +pod2usage(0) if $h{help}; +pod2usage(1) unless $h{anonymize}; + +FixMyStreet::Script::Inactive->new(%h)->reports; + +__END__ + +=head1 NAME + +process-inactive-reports - deal with anonymizing inactive non-open reports + +=head1 SYNOPSIS + +process-inactive-reports --anonymize N + + Options: + --anonymize Anonymize non-open reports (and related) inactive longer than this time (months) + --dry-run Don't actually anonymize anything or send any emails + --verbose Output as to which reports are being affected + --help This help message + +=cut |