aboutsummaryrefslogtreecommitdiffstats
path: root/bin/comment-backfill
diff options
context:
space:
mode:
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;