diff options
author | Struan Donald <struan@exo.org.uk> | 2012-03-28 17:06:28 +0100 |
---|---|---|
committer | Struan Donald <struan@exo.org.uk> | 2012-03-28 17:06:28 +0100 |
commit | 651f8d304bb77e09b60317fcdc1cc777de5816bd (patch) | |
tree | ea9261e54eed8d55c56fc2a61c77d7bbfbc7e84e | |
parent | 927e8b24e6c1cbb3a0114e14d2d61a0891dca082 (diff) |
add script to fetch the last 25 hours comments in case we missed any
-rwxr-xr-x | bin/comment-backfill | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/bin/comment-backfill b/bin/comment-backfill new file mode 100755 index 000000000..dfdaf2750 --- /dev/null +++ b/bin/comment-backfill @@ -0,0 +1,21 @@ +#!/usr/bin/env perl + +use strict; +use warnings; +require 5.8.0; +use DateTime; + +use FixMyStreet::App; + +use Open311; +use Open311::GetServiceRequestUpdates; + +my $start_time = DateTime->now->subtract( days => 1, hours => 1 ); +my $end_time = DateTime->now; + +my $updates = Open311::GetServiceRequestUpdates->new( + start_time => $start_time, + end_time => $end_time, +); + +$updates->fetch; |