Commit Graph

20 Commits

Author SHA1 Message Date
Rostislav Wolny
33f4b2d729 Replace usage of WP's current_time without gmt parameter in libs
This commit replaces usages by Carbon::now or in case we need a timestamp it
keeps current_time but adds the gtm parameter as true.
[MAILPOET-6142]
2024-08-19 15:29:42 +02:00
Pavel Dohnal
dec9a02ca4 Replace join query with a simple query
[MAILPOET-6148]
2024-07-19 15:03:35 +02:00
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
Jan Jakes
18b227429f Delete sending queues 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
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
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
Sam Najian
3ec2a187de Force a re-render when resuming a corrupt newsletter
[MAILPOET-5104]
2023-03-06 12:53:02 +01: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 Lysý
a1e96c63a0 Remove old model usages from AutomaticEmailScheduler
[MAILPOET-4372]
2022-10-12 11:44:37 +02:00
Rodrigo Primo
dd6cbbbbce Create SendingQueuesRepository::countAllByNewsletterAndTaskStatus()
This method will be used in a subsequent commit to replace some of the
usages of the method SendingQueue::findTaskByNewsletterId() as part of
the refactor from Paris to Doctrine.

[MAILPOET-4138]
2022-05-09 13:04:56 +02:00
Rostislav Wolny
823aca38e4 Refactor fetching task ids to doctrine in task subscribers listing
[MAILPOET-4006]
2022-04-04 15:33:52 +02:00
Jan Jakes
9f790efbf0 Move plugin files to a subfolder
[MAILPOET-3988]
2022-01-18 15:30:22 +01:00