diff options
author | Matthew Somerville <matthew@mysociety.org> | 2015-09-25 22:35:39 +0100 |
---|---|---|
committer | Matthew Somerville <matthew@mysociety.org> | 2015-12-02 17:41:35 +0000 |
commit | 55412b79394ff1b1cabe368aed67fa8f68680ecc (patch) | |
tree | 33657093517818b8ba60f156484ec540f9c4af17 /bin/fixmystreet.com | |
parent | 0c2a792b154e1b28528db887bbde80b19268b9fe (diff) |
Reduce use of FixMyStreet::App.
Command line scripts don't need a full blown app, just database.
Diffstat (limited to 'bin/fixmystreet.com')
-rwxr-xr-x | bin/fixmystreet.com/populate_bing_cache | 4 | ||||
-rwxr-xr-x | bin/fixmystreet.com/update-send-questionnaire | 5 |
2 files changed, 5 insertions, 4 deletions
diff --git a/bin/fixmystreet.com/populate_bing_cache b/bin/fixmystreet.com/populate_bing_cache index 17c8911d0..c644b34fa 100755 --- a/bin/fixmystreet.com/populate_bing_cache +++ b/bin/fixmystreet.com/populate_bing_cache @@ -6,12 +6,12 @@ require 5.8.0; use Data::Dumper; -use FixMyStreet::App; +use FixMyStreet::DB; use FixMyStreet::Geocode::Bing; my $bing_culture = 'en-GB'; -my $reports = FixMyStreet::App->model('DB::Problem')->search( +my $reports = FixMyStreet::DB->resultset('Problem')->search( { geocode => undef, confirmed => { '!=', undef }, diff --git a/bin/fixmystreet.com/update-send-questionnaire b/bin/fixmystreet.com/update-send-questionnaire index 7a231b919..40549c6e4 100755 --- a/bin/fixmystreet.com/update-send-questionnaire +++ b/bin/fixmystreet.com/update-send-questionnaire @@ -10,7 +10,8 @@ reports in cobrands that don't send questionnaires at all. use strict; use warnings; -use FixMyStreet::App; +use FixMyStreet::Cobrand; +use FixMyStreet::DB; my @cobrands; foreach my $cobrand ( FixMyStreet::Cobrand->available_cobrand_classes() ) { @@ -19,7 +20,7 @@ foreach my $cobrand ( FixMyStreet::Cobrand->available_cobrand_classes() ) { push @cobrands, $cls->moniker if !$cls->send_questionnaires(); } -my $problems = FixMyStreet::App->model('DB::Problem')->search({ +my $problems = FixMyStreet::DB->resultset('Problem')->search({ cobrand => \@cobrands, send_questionnaire => 1, }); |