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 1059-1064
sub SendQueuedMessages {
Link Here
|
1059 |
}; |
1060 |
}; |
1060 |
my $unsent_messages = _get_unsent_messages( $which_unsent_messages ); |
1061 |
my $unsent_messages = _get_unsent_messages( $which_unsent_messages ); |
1061 |
MESSAGE: foreach my $message ( @$unsent_messages ) { |
1062 |
MESSAGE: foreach my $message ( @$unsent_messages ) { |
|
|
1063 |
my $message_object = Koha::Notice::Messages->find( $message->{message_id} ); |
1064 |
$message_object->status('processing'); |
1065 |
# If this fails the database is unwritable and we won't manage to send a message that continues to be marked 'pending' |
1066 |
return unless $message_object->store(); |
1067 |
|
1062 |
# warn Data::Dumper->Dump( [ $message ], [ 'message' ] ); |
1068 |
# warn Data::Dumper->Dump( [ $message ], [ 'message' ] ); |
1063 |
warn sprintf( 'sending %s message to patron: %s', |
1069 |
warn sprintf( 'sending %s message to patron: %s', |
1064 |
$message->{'message_transport_type'}, |
1070 |
$message->{'message_transport_type'}, |
1065 |
- |
|
|