Commit Graph

16 Commits

Author SHA1 Message Date
alex-mpoet
c59ae2d82c Add cron pinging endpoint
[MAILPOET-6029]
2024-06-10 17:07:31 +02:00
Rodrigo Primo
19b33e15f5 Refactor SendingQueue::add() to use Doctrine instead of Tasks\Sending
[MAILPOET-5684]
2024-01-31 12:21:54 +01:00
Rodrigo Primo
d4a80c7230 Move SendingQueueEntity::toArray() to SendingQueuesResponseBuilder::build()
Based on a suggestion during the review of the PR, it was decided that
it makes more sense for the code that was created as
SendingQueueEntity::toArray() tp be moved to
SendingQueuesResponseBuilder::build(). It is used only to build the
format that is send in the API response.

[MAILPOET-4368]
2023-10-25 21:09:39 +02:00
Rodrigo Primo
508fdd7756 Refresh Doctrine entities in SendingQueue::add() to avoid issues
Since SendingQueue::add() still uses Paris, it was running into some
problems caught by our integration tests since some Sending methods
where refactored to Doctrine. The issue was that we started loading some
Doctrine entities earlier, then Paris code inside SendingQueue::add()
would change the same rows, causing the Doctrine entities to contain
stale data. To workaround this problem, in this commit, we are making
sure that the Doctrine entities are refreshed after they are changed by
Paris.

I considered refactoring SendingQueue::add() to use Doctrine but I
wasn't sure what to do with SendingTask::create() and
SendingTask::createFromQueue() so I decided to take a different
approach.

[MAILPOET-4368]
2023-10-25 21:09:39 +02:00
Rodrigo Primo
dc1cee5118 Replace Newsletter model with NewsletterEntity in SendingQueue
This was the easiest way to fix failing integration tests related to
updating some Sending methods to use Doctrine instead of Paris. Using
Paris in SendingQueue to update the database was creating a state where
Doctrine had stale data and this was causing the tests to fail.

[MAILPOET-4368]
2023-10-25 21:09:39 +02:00
John Oleksowicz
38e709e3b1 Filter subscribers when creating scheduled tasks
MAILPOET-5509
2023-08-31 14:16:10 +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
d3e2bcdf34 Refactor daemon trigger and daemon run actions to extra classes
[MAILPOET-4274]
2022-08-03 10:36:57 +02:00
Rostislav Wolny
eedc18bb7f Trigger action scheduler runner immediately when starting sending
When users click send email in UI, they need to wait a minute or more to
see some emails started going out.

This commit adds additional trigger into sending queue API.
If emails is set to send it triggers Action Scheduler immediately.
Users will get immediate feedback that emails are sending.
[MAILPOET-4274]
2022-08-03 10:36:57 +02:00
John Oleksowicz
9bfe2b2ca1 Newsletter validation updates
- Rename validator to newsletterValidator for clarity
- Add validation for ALC content
- Refactor tests to use data factory for consistency and to avoid
validation issues
- Add separate tests for NewsletterValidator service
- Add test helper for retrieving service with private properties
overridden by name

[MAILPOET-4236]
2022-05-16 11:17:29 +02:00
John Oleksowicz
fdaf22d46b Extract newsletter validation to a service
[MAILPOET-4236]
2022-05-16 11:17:29 +02:00
David Remer
ca3f8bdc43 Make Scheduler non-static
[MAILPOET-4252]
2022-04-25 12:08:18 +02:00
Rostislav Wolny
06fb13bd86 Use MailerFactory in sending queue API mailer config check
[MAILPOET-4115]
2022-04-11 16:54:38 +02:00
Rodrigo Primo
54ecb6065c Replace old ScheduledTask model with ScheduledTaskEntity in SubscribersFinder
[MAILPOET-3925]
2022-03-28 08:13:53 +02:00
Rodrigo Primo
0a73135c83 Replace old Segment model with Doctrine in SubscribersFinder
[MAILPOET-3925]
2022-03-28 08:13:53 +02:00
Jan Jakes
9f790efbf0 Move plugin files to a subfolder
[MAILPOET-3988]
2022-01-18 15:30:22 +01:00