aboutsummaryrefslogtreecommitdiffstats
path: root/bin/send-comments
diff options
context:
space:
mode:
authorStruan Donald <struan@exo.org.uk>2012-11-19 15:20:35 +0000
committerStruan Donald <struan@exo.org.uk>2012-11-19 15:20:35 +0000
commit836aacb85830ede81989ea31fc510e7d531ddfc2 (patch)
tree53bd1c0f86f34fdec7ebee0a181a478382a3db4b /bin/send-comments
parent468f89a56ad2cc69ec4ad4904a18dcf891a505cd (diff)
turn on extended updates for bromley and special case their endpoint
Diffstat (limited to 'bin/send-comments')
-rwxr-xr-xbin/send-comments13
1 files changed, 13 insertions, 0 deletions
diff --git a/bin/send-comments b/bin/send-comments
index b054ebd8f..d6496fb57 100755
--- a/bin/send-comments
+++ b/bin/send-comments
@@ -41,6 +41,7 @@ my $councils = FixMyStreet::App->model('DB::Open311Conf')->search( {
} );
while ( my $council = $councils->next ) {
+ my $use_extended = 0;
my $comments = FixMyStreet::App->model('DB::Comment')->search( {
'me.whensent' => undef,
'me.external_id' => undef,
@@ -56,12 +57,24 @@ while ( my $council = $councils->next ) {
}
);
+ if ( $council->area_id == 2482 ) {
+ $use_extended = 1;
+ }
+
my $o = Open311->new(
endpoint => $council->endpoint,
jurisdiction => $council->jurisdiction,
api_key => $council->api_key,
+ use_extended_updates => $use_extended,
);
+ if ( $council->area_id =~ /2482/ ) {
+ my $endpoints = $o->endpoints;
+ $endpoints->{update} = 'update.xml';
+ $endpoints->{service_requests_updates} = 'update.xml';
+ $o->endpoints( $endpoints );
+ }
+
while ( my $comment = $comments->next ) {
my $cobrand = FixMyStreet::Cobrand->get_class_for_moniker($comment->cobrand)->new();