aboutsummaryrefslogtreecommitdiffstats
path: root/bin/comment-backfill
diff options
context:
space:
mode:
authorDave Whiteland <dave@mysociety.org>2012-05-29 15:57:41 +0100
committerDave Whiteland <dave@mysociety.org>2012-05-29 15:57:41 +0100
commit67da8efc720d2d0bd22bd9fe8655b7e983b35bb4 (patch)
tree38b8570647124df06c637d4b923f6010211ef328 /bin/comment-backfill
parent40b3a51d33caefa8f5fb97ce9be18ef936c7e260 (diff)
parent131ff6e9bf3626d6a8fff6ae54669d250148a63a (diff)
Merge remote branch 'origin/master' into fmb-read-only
Conflicts: bin/send-reports perllib/FixMyStreet/Cobrand/Default.pm perllib/FixMyStreet/Cobrand/FixMyStreet.pm templates/web/fixmystreet/alert/index.html templates/web/fixmystreet/around/display_location.html web/cobrands/fixmystreet/_layout.scss web/js/map-OpenLayers.js
Diffstat (limited to 'bin/comment-backfill')
-rwxr-xr-xbin/comment-backfill21
1 files changed, 21 insertions, 0 deletions
diff --git a/bin/comment-backfill b/bin/comment-backfill
new file mode 100755
index 000000000..e296d7756
--- /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_date => $start_time,
+ end_date => $end_time,
+);
+
+$updates->fetch;