aboutsummaryrefslogtreecommitdiffstats
path: root/bin/send-comments
diff options
context:
space:
mode:
Diffstat (limited to 'bin/send-comments')
-rwxr-xr-xbin/send-comments13
1 files changed, 5 insertions, 8 deletions
diff --git a/bin/send-comments b/bin/send-comments
index fbbd57891..c3f21fb2c 100755
--- a/bin/send-comments
+++ b/bin/send-comments
@@ -20,15 +20,12 @@ BEGIN {
require "$d/../setenv.pl";
}
-use Digest::MD5;
-use Encode;
use CronFns;
-use FixMyStreet::App;
-
-use Utils;
use mySociety::Config;
-
+use DateTime;
+use FixMyStreet::Cobrand;
+use FixMyStreet::DB;
use Open311;
# send_method config values found in by-area config data, for selecting to appropriate method
@@ -42,7 +39,7 @@ my ($verbose, $nomail) = CronFns::options();
my $base_url = mySociety::Config::get('BASE_URL');
my $site = CronFns::site($base_url);
-my $bodies = FixMyStreet::App->model('DB::Body')->search( {
+my $bodies = FixMyStreet::DB->resultset('Body')->search( {
send_method => SEND_METHOD_OPEN311,
send_comments => 1,
} );
@@ -54,7 +51,7 @@ while ( my $body = $bodies->next ) {
next if $body->areas->{+COUNCIL_ID_OXFORDSHIRE};
my $use_extended = 0;
- my $comments = FixMyStreet::App->model('DB::Comment')->search( {
+ my $comments = FixMyStreet::DB->resultset('Comment')->search( {
'me.whensent' => undef,
'me.external_id' => undef,
'me.state' => 'confirmed',