Commit Graph

27 Commits

Author SHA1 Message Date
Jan Jakes
e3ff7ccaca Remove remaining usages of MailPoet\Task\Sending from SendingQueue::processSending()
[MAILPOET-5682]
2024-01-12 13:25:46 +01:00
Jan Jakes
fa266dadcd Rewrite SendingErrorHandler using Doctrine
[MAILPOET-5682]
2024-01-12 13:25:46 +01:00
Jan Lysý
525c80bac4 Fix PHPStan warnings in lib
[MAILPOET-5751]
2023-12-13 11:48:14 +01:00
Jan Jakes
68abd6b964 Remove MailPoet\Tasks\Sending::BATCH_SIZE
[MAILPOET-4375]
2023-11-02 12:53:36 +01:00
Rodrigo Primo
46f317563e Don't thrown an exception if data is incorrect
See https://github.com/mailpoet/mailpoet/pull/5238#discussion_r1371462690

[MAILPOET-4368]
2023-10-25 21:09:39 +02:00
Rodrigo Primo
040ed6fa80 Minor improvement: use ScheduledTaskEntity::getSendingQueue()
Using it to avoid using $this->queue->id

[MAILPOET-4368]
2023-10-25 21:09:39 +02:00
Rodrigo Primo
18d34202a8 Remove remaining uses of the ScheduledTaskSubscriber model from Sending
[MAILPOET-4368]
2023-10-25 21:09:39 +02:00
Rodrigo Primo
63a0f0b940 Remove \MailPoet\Tasks\Subscribers class now that it is not used anymore
[MAILPOET-4368]
2023-10-25 21:09:39 +02:00
Rodrigo Primo
8b4e747499 Refactor Sending::saveSubscriberError() to use Doctrine instead of Paris
[MAILPOET-4368]
2023-10-25 21:09:39 +02:00
Rodrigo Primo
d5cb060cb5 Refactor Sending::delete() to use Doctrine instead of Paris
[MAILPOET-4368]
2023-10-25 21:09:39 +02:00
Rodrigo Primo
2b368141db Refactor updateProcessedSubscribers() to use Doctrine instead of Paris
It was necessary to update a test to be more lenient when comparing
dates and another one to persist a change in Paris to the database.

[MAILPOET-4368]
2023-10-25 21:09:39 +02:00
Rodrigo Primo
c0a091de04 Add the ScheduledTaskEntity as a property to the Sending class
Doing this instead of having to get the ScheduledTaskEntity in several
methods of this class.

[MAILPOET-4368]
2023-10-25 21:09:39 +02:00
Rodrigo Primo
4e633f64fb Remove unused method removeAllSubscribers()
This method was added in c0c57f6b67 but
its only usage besides integration test was removed in
18a6a1c439. It doesn't seem like it is
still used in our code base.

[MAILPOET-4368]
2023-10-25 21:09:39 +02:00
Rodrigo Primo
fefaf174cd Refactor Sending::removeSubscribers() to use Doctrine instead of Paris
[MAILPOET-4368]
2023-10-25 21:09:39 +02:00
Rodrigo Primo
8fd8b8f193 Refactor Sending::setSubscribers() to use Doctrine instead of Paris
[MAILPOET-4368]
2023-10-25 10:31:45 +02:00
Rodrigo Primo
b252043dac Refactor Sending::getSubscribers() to use Doctrine instead of Paris
[MAILPOET-4368]
2023-10-25 10:31:45 +02:00
Jan Jakes
e2cf884b98 Add missing ContainerWrapper return type, fix reported errors
[MAILPOET-5569]
2023-09-20 02:36:40 -07:00
alex-mailpoet
764114edc7 Replace two counting DB queries with arithmetic in sending loop
[MAILPOET-5178]
2023-07-03 16:52:46 +02:00
Jan Jakes
926620e8f8 Ignore strict types rule in all existing files that don't have it
[MAILPOET-2688]
2022-11-29 15:04:09 +01:00
Rostislav Wolny
918a4d7c74 Refresh the sending queue entity when fetching it from the old model
By moving the refresh code into the method used for getting sending queue entity for the old model object
we want to make our code better protected from working with inconsistent sending queue data.
[MAILPOET-4750]
2022-10-27 12:08:31 +02:00
Rostislav Wolny
ec29c8fb49 Change order of saving sending task related data
In case we save the task and and queue saving fails the sending may be triggered with incorrect data in the queue.
Since the scheduled task is used for controlling sending state lets save it as last so that we are sure all related
data are up to date before saving the task.
[MAILPOET-4750]
2022-10-27 12:08:31 +02:00
Rodrigo Primo
ccbdbd3e93 Refactor getNewsletterFromQueue() to use Doctrine instead of Paris
[MAILPOET-4363]
2022-09-21 16:03:21 +02:00
Jan Lysý
cb4fabad4a Remove the Sending::getScheduledQueues() method
[MAILPOET-4367]
2022-09-19 11:07:16 +02:00
Sam Najian
873c295e99 Remove Paris models and Tasks\Sending from PostNotificationScheduler
[MAILPOET-4371]
2022-08-22 13:06:43 +02:00
Jan Lysý
a362b7e014 Delete Sending::getRunningQueues()
[MAILPOET-4366]
2022-08-19 15:11:23 +02:00
Rostislav Wolny
9b71a7804c Update Monolog/Monolog from v1 to v2
[MAILPOET-4175]
2022-03-28 13:49:41 +02:00
Jan Jakes
9f790efbf0 Move plugin files to a subfolder
[MAILPOET-3988]
2022-01-18 15:30:22 +01:00