diff options
author | Jon Kristensen <info@jonkri.com> | 2014-02-01 12:13:32 +0100 |
---|---|---|
committer | Matthew Somerville <matthew-github@dracos.co.uk> | 2014-03-11 16:54:08 +0000 |
commit | 82cc874848f8d0a184a7f624a6212d3a568efa6d (patch) | |
tree | 65116841348320527b94f877834ca68389238169 /bin/open311-update-reports | |
parent | 968ec2ef16b0be28d3ade38264dc57d253e73663 (diff) |
Bring back open311-update-reports, GetUpdates.pm and getupdates.t
This commit reverses the "Remove unused Open311 GetUpdates code." commit.
FixaMinGata, the Swedish FixMyStreet cobrand, is still using
open311-update-reports.
Diffstat (limited to 'bin/open311-update-reports')
-rw-r--r-- | bin/open311-update-reports | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/bin/open311-update-reports b/bin/open311-update-reports new file mode 100644 index 000000000..e7ff34273 --- /dev/null +++ b/bin/open311-update-reports @@ -0,0 +1,21 @@ +#!/usr/bin/perl + +use strict; +use warnings; +use Open311::GetUpdates; +use FixMyStreet::App; + +# FIXME - make this configurable and/or better +my $system_user = FixMyStreet::App->model('DB::User')->find_or_create( + { + email => FixMyStreet::App->config->{'CONTACT_EMAIL'}, + name => 'System User', + } +); + +my $council_list = FixMyStreet::App->model('DB::Body'); + +my $update = Open311::GetUpdates->new( + council_list => $council_list, + system_user => $system_user +)->get_updates; |