Lines 36-41
use Koha::DateUtils;
Link Here
|
36 |
use Koha::SMS::Providers; |
36 |
use Koha::SMS::Providers; |
37 |
|
37 |
|
38 |
use Koha::Email; |
38 |
use Koha::Email; |
|
|
39 |
use Koha::Notice::Messages; |
39 |
use Koha::DateUtils qw( format_sqldatetime dt_from_string ); |
40 |
use Koha::DateUtils qw( format_sqldatetime dt_from_string ); |
40 |
use Koha::Patrons; |
41 |
use Koha::Patrons; |
41 |
|
42 |
|
Lines 1037-1042
sub SendQueuedMessages {
Link Here
|
1037 |
|
1038 |
|
1038 |
my $unsent_messages = _get_unsent_messages( { limit => $params->{limit} } ); |
1039 |
my $unsent_messages = _get_unsent_messages( { limit => $params->{limit} } ); |
1039 |
MESSAGE: foreach my $message ( @$unsent_messages ) { |
1040 |
MESSAGE: foreach my $message ( @$unsent_messages ) { |
|
|
1041 |
my $message_object = Koha::Notice::Messages->find( $message->{message_id} ); |
1042 |
$message_object->status('processing'); |
1043 |
# If this fails the database is unwritable and we won't manage to send a message that continues to be marked 'pending' |
1044 |
return unless $message_object->store(); |
1045 |
|
1040 |
# warn Data::Dumper->Dump( [ $message ], [ 'message' ] ); |
1046 |
# warn Data::Dumper->Dump( [ $message ], [ 'message' ] ); |
1041 |
warn sprintf( 'sending %s message to patron: %s', |
1047 |
warn sprintf( 'sending %s message to patron: %s', |
1042 |
$message->{'message_transport_type'}, |
1048 |
$message->{'message_transport_type'}, |
1043 |
- |
|
|