David Remer
630b633eed
Move campaign data in own class
2024-04-22 10:06:12 +02:00
John Oleksowicz
ba4e54f261
Move query to SendingQueuesRepository
...
The main piece of data we care about is the campaignId, which is saved
in the sending queue's meta, so I think it makes more sense to base the
query on the sending queues as opposed to newsletters.
MAILPOET-5629
2024-04-22 10:06:12 +02:00
Mike Jolley
435f638011
Apply rules on lib dir
2024-03-21 16:57:59 +01:00
Jan Jakes
a947dd36cd
Use refreshAll() helper for batch updates
...
[MAILPOET-5845]
2024-02-02 12:48:40 +01:00
Jan Jakes
18b227429f
Delete sending queues using a repository
...
[MAILPOET-5845]
2024-02-02 12:48:40 +01:00
Jan Jakes
98d46f2fdb
Delete scheduled tasks using a repository
...
[MAILPOET-5845]
2024-02-02 12:48:40 +01:00
Jan Jakes
bcc96d27bb
Delete scheduled tasks subscribers using a repository
...
[MAILPOET-5845]
2024-02-02 12:48:40 +01:00
Rodrigo Primo
62db03d95b
Update findOneByNewsletterAndTaskStatus() to work with null status
...
This commits updates the method findOneByNewsletterAndTaskStatus() so
that it can retrieve SendingQueues when the task status is null.
[MAILPOET-5737]
2024-01-31 12:21:54 +01:00
Oluwaseun Olorunsola
639d779088
Unify ProcessedAt timezone
...
Fix a problem in the codebase where we create, schedule and update newsletters in the user time zone, but we set the ProcessedAt with another timezone
Also, `Carbon::createFromTimestamp($this->wp->currentTime('mysql'))` is not a valid date.
It would return date: '1970-01-01 00:35:29.000000'
MAILPOET-5795
2023-12-25 21:38:02 +01:00
Jan Jakes
469bdebf9c
Use the new detach helper in other batch delete use cases
...
[MAILPOET-5745]
2023-12-04 12:13:51 +01:00
Jan Jakes
45f5803293
Sync bulk deletes of scheduled task subscribers to entity manager
...
Fixes: https://github.com/mailpoet/mailpoet/issues/5281
[MAILPOET-5745]
2023-12-04 12:13:51 +01:00
Jan Jakes
519407bbc8
Call flush() in SendingQueuesRepository::updateCounts()
...
[MAILPOET-4375]
2023-11-02 12:53:36 +01:00
Jan Jakes
1ef88a5fb5
Rewrite Scheduler::processPostNotificationNewsletter() using Doctrine
...
[MAILPOET-4375]
2023-11-02 12:53:36 +01: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
8b4e747499
Refactor Sending::saveSubscriberError() to use Doctrine instead of Paris
...
[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
59d4ce3ba2
Update checkCompleted() to also change the processedAt field
...
This commit updates the method ScheduledTaskSubscribersRepository::checkCompleted() to update the processedAt field of the Scheduled Task. The method was added in f62d9b4167
and I believe it is meant to be a replacement to \MailPoet\Tasks\Subscribers::checkCompleted(). The original method updates the processedAt field, so I'm assuming the new method should update as well. I found this while working on refactoring \MailPoet\Tasks\Sending::removeSubscribers() to use Doctrine as this method calls \MailPoet\Tasks\Subscribers::checkCompleted() internaly.
[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
John Oleksowicz
bbb1a133fb
Don't allow saving of lookup data to throw unhandled errors
...
It's not a critical error if we aren't able to save this lookup data,
and we wouldn't want it to interfere with the sending of a newsletter,
but we should log it as an error for debugging purposes.
MAILPOET-5625
2023-10-13 11:21:42 +02:00
John Oleksowicz
12362c0399
Update filter interface for lookup data
...
This method is intended to store the actual names of things that might
change or be deleted in the future, so we can include accurate
information when showing what the snapshot of the filter was at the time
.
MAILPOET-5625
2023-10-13 11:21:42 +02:00
John Oleksowicz
bb7a98ad82
Save filter segment data to queue at send time
...
MAILPOET-5509
2023-08-31 14:16:10 +02:00
Rodrigo Primo
6a438f68d8
Remove duplicated method in ScheduledTaskSubscribersRepository
...
[MAILPOET-5422]
2023-06-23 16:59:32 +02:00
David Remer
a69b2ee7dc
Query for tasks by type and subscriber
...
[MAILPOET-4934]
2023-05-15 08:19:19 +02:00
Sam Najian
397232e932
Set status of scheduled_task to invalid if it has not subs
...
[MAILPOET-5134]
2023-04-03 11:53:49 +02:00
Jan Lysý
2547f4bfbd
Replace old model usages by Doctrine
...
[MAILPOET-4303]
2023-03-22 09:20:11 +01:00
Jan Lysý
2ead4214cd
Move query with inserting task subscribers to repository
...
[MAILPOET-4303]
2023-03-22 09:20:11 +01:00
Jan Lysý
d54e666eea
Fix ordering by subscriber
...
[MAILPOET-4660]
2023-03-09 13:02:45 +01:00
Sam Najian
3ec2a187de
Force a re-render when resuming a corrupt newsletter
...
[MAILPOET-5104]
2023-03-06 12:53:02 +01:00
Jan Lysý
26a85458a5
Remove usage Sending::createFromQueue from Scheduler test
...
[MAILPOET-4369]
2023-03-02 12:39:35 +02:00
Jan Lysý
20e435872f
Add method for update processed subscribers
...
[MAILPOET-4369]
2023-03-02 12:39:35 +02:00
John Oleksowicz
49c85c05ed
Move campaignId generation to more logical place
...
MAILPOET-5034
2023-02-26 15:20:48 +01:00
John Oleksowicz
0435c09c53
Calculate and store campaign IDs on sending queues
...
[MAILPOET-5033]
2023-02-26 15:20:48 +01: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
Jan Jakes
c67c58709b
Unify spacing of declare statements
...
[MAILPOET-2688]
2022-11-29 15:04:09 +01:00
Jan Lysý
c121c60e8c
Fix condition for the running status
...
[MAILPOET-4664]
2022-11-21 12:45:28 +01:00
Jan Lysý
110859508e
Fix tasks order on the status page
...
[MAILPOET-4664]
2022-11-21 12:45:28 +01:00
Jan Lysý
efd3377ecd
Fix count of tasks on the status page
...
[MAILPOET-4664]
2022-11-21 12:45:28 +01:00
Jan Lysý
d2247a1c76
Refactor parameter from int to entity
...
[MAILPOET-4372]
2022-10-12 11:44:37 +02:00
Jan Lysý
a1e96c63a0
Remove old model usages from AutomaticEmailScheduler
...
[MAILPOET-4372]
2022-10-12 11:44:37 +02:00
Jan Lysý
745ff6af2a
Remove SendingTask usages from AutomaticEmailTest
...
[MAILPOET-4372]
2022-10-12 11:44:37 +02:00
Jan Lysý
6989bd9413
Make limit parameter optional
...
Unification function parameters with a similar method from the repository.
[MAILPOET-4367]
2022-09-19 11:07:16 +02:00
Jan Lysý
9e7a3c2767
Add method for finding scheduled tasks
...
[MAILPOET-4367]
2022-09-19 11:07:16 +02:00
Jan Lysý
abfab0b0ea
Use currentTimme from WP
...
[MAILPOET-4367]
2022-09-19 11:07:16 +02:00
Jan Lysý
aa84ce66a6
Add new method into repository
...
[MAILPOET-4309]
2022-08-31 13:42:21 +02:00
Sam Najian
e3b02a9a64
PR feedback adjustments
...
[MAILPOET-4355]
2022-08-22 11:24:06 +02:00
Sam Najian
73d15c8c44
Move getLatestTasks to ScheduledTasksRepository
...
- Move the method
- Adjust the usages
- Adjust and update tests
[MAILPOET-4355]
2022-08-22 11:24:06 +02:00
Sam Najian
bf1ddbedbc
Move getCountsPerStatus to ScheduledTasksRepository
...
- Move getCountsPerStatus
- Defined test for getCountsPerStatus
- Update usage
[MAILPOET-4355]
2022-08-22 11:24:06 +02:00
Jan Lysý
5dfda9f3e2
Move task type const from entity to worker
...
[MAILPOET-4366]
2022-08-19 15:11:23 +02:00
Jan Lysý
77eaa7e710
Remove check that sending queue is deleted at
...
[MAILPOET-4366]
2022-08-19 15:11:23 +02:00
Jan Lysý
5f30c7a511
Add method for getting running sending tasks
...
[MAILPOET-4366]
2022-08-19 15:11:23 +02:00