aboutsummaryrefslogtreecommitdiffstats
path: root/bin
diff options
context:
space:
mode:
authorMatthew Somerville <matthew-github@dracos.co.uk>2017-07-13 09:51:00 +0100
committerStruan Donald <struan@exo.org.uk>2017-08-09 17:03:48 +0100
commite00c75d7f19bc45879c254ea77dce32df825f3a7 (patch)
tree7fd42ffd93fa244f81a84d8a5ace4f7be03b81c7 /bin
parent46b9d8989d5ac2f8eedd196d11ceb4baf57728dd (diff)
Move FixMyStreet::DB to FixMyStreet::DB::Schema.
Store a schema object on FixMyStreet::DB instead.
Diffstat (limited to 'bin')
-rwxr-xr-xbin/fixmystreet.com/fixture2
-rwxr-xr-xbin/oxfordshire/send-rdi-emails2
-rwxr-xr-xbin/zurich/overdue-alert4
3 files changed, 4 insertions, 4 deletions
diff --git a/bin/fixmystreet.com/fixture b/bin/fixmystreet.com/fixture
index d3b0a8349..912d34aab 100755
--- a/bin/fixmystreet.com/fixture
+++ b/bin/fixmystreet.com/fixture
@@ -31,7 +31,7 @@ my ($opt, $usage) = describe_options(
);
print($usage->text), exit if $opt->help;
-my $db = FixMyStreet::DB->storage;
+my $db = FixMyStreet::DB->schema->storage;
$db->txn_begin;
END {
if ($db) {
diff --git a/bin/oxfordshire/send-rdi-emails b/bin/oxfordshire/send-rdi-emails
index 11e7a6fe9..9eff02715 100755
--- a/bin/oxfordshire/send-rdi-emails
+++ b/bin/oxfordshire/send-rdi-emails
@@ -55,7 +55,7 @@ foreach my $inspector (@inspectors) {
};
my $result = FixMyStreet::Email::send_cron(
- FixMyStreet::DB->storage->schema,
+ FixMyStreet::DB->schema,
"rdi.txt", $params, $hdrs,
undef, 0, $cobrand,
);
diff --git a/bin/zurich/overdue-alert b/bin/zurich/overdue-alert
index 90e31df1c..f4fd0f4b7 100755
--- a/bin/zurich/overdue-alert
+++ b/bin/zurich/overdue-alert
@@ -38,7 +38,7 @@ loop_through( 'alert-overdue.txt', 0, 6, ['confirmed', 'planned'] );
sub loop_through {
my ( $template, $include_parent, $days, $states ) = @_;
- my $dtf = FixMyStreet::DB->storage->datetime_parser;
+ my $dtf = FixMyStreet::DB->schema->storage->datetime_parser;
my $date_threshold = $dtf->format_datetime(FixMyStreet::Cobrand::Zurich::sub_days( $now, $days ));
my $reports = FixMyStreet::DB->resultset("Problem")->search( {
@@ -78,7 +78,7 @@ sub send_alert {
}
FixMyStreet::Email::send_cron(
- FixMyStreet::DB->storage->schema,
+ FixMyStreet::DB->schema,
$template,
$h,
{