Commit Graph

312 Commits

Author SHA1 Message Date
3ae8763837 Refactor sending error handling to extra class
The SendigQueue worker is already a very complex class and handles a lot of things.
Since we want to make error handling more sophisticated it is better to move the error handling responsibility
to a new class.

[MAILPOET-1154]
2018-09-13 11:12:38 +02:00
223c2e1562 Add subscriber errors passing via MailerError object
We want to process errors for individual subscribers.
Subscriber errors were inlined into error message string.
This commit changes this so that we are now able to get
subscriber errors as a data which are easy to process further.

[MAILPOET-1154]
2018-09-13 09:48:54 +02:00
0923c892c1 Refactor sending methods to use error mappers
We want to add some logic to error handling.
This commit extracts error handling code from sending methods classes,
which already do a lot of other stuff, to error mappers which are responsible
for creating proper error object (MailerError). This error object is a replacement
for assoc. array which already had some special keys for certain usecases and
can not be properly type hinted.

[MAILPOET-1154]
2018-09-13 09:33:26 +02:00
8cf5d17cfd Refactor sending task variable name and add typehint
[MAILPOET-1154]
2018-09-13 09:33:26 +02:00
ae0e03d2f3 Update code for PHP 5.5
[MAILPOET-1496]
2018-08-23 12:10:21 +02:00
27b9857e6a Improve error reporting for MSS sending
[MAILPOET-1445]
2018-07-19 16:21:23 +01:00
9308cffd45 Refactor fetching newsletter options to respect its type [MAILPOET-1431] 2018-06-19 17:06:56 +02:00
dde03e0ae6 Adds missing import after merge conflict resolution 2018-06-11 13:48:59 -04:00
6d74ba8bb0 Validates that subscriber exists when processing automatic email 2018-06-11 13:40:05 -04:00
b75d4db412 Adds newsletter/cron scheduler for automatic emails 2018-06-11 13:38:11 -04:00
2c290c6e4c Rotate sending queues
This should prevent sending queues to be stuck when a newsletter cannot be send.

[MAILPOET-1391]
2018-06-05 11:05:59 +01:00
b8ce6ff88c Rotate scheduled tasks
Scheduled tasks should rotate so that they don't block
sending when they cannot be send.

[MAILPOET-1391]
2018-06-04 16:00:32 +01:00
28651227d5 Uses rendered subject from queue when preparing newsletter for sending 2018-05-07 20:06:03 -04:00
a588e95762 Add a limit to fetch 5 scheduled tasks at a time [MAILPOET-1366] 2018-05-02 23:27:30 +03:00
afefa89466 Ensures that queues are instance of the scheduled task class 2018-04-11 18:58:29 -04:00
467cf350e9 Abstract WP's current_time() function in the code base 2018-03-20 16:34:50 -04:00
d317eb4fbd Adds unit test 2018-03-20 16:30:28 -04:00
44b96aa9a7 Uses WP time to schedule migration task 2018-03-20 15:48:21 -04:00
a3cabad752 Merge pull request #1268 from mailpoet/sending_queue_refactoring
Refactor sending queues to use scheduled task and task subscriber tables [MAILPOET-903]
2018-03-20 08:47:26 -04:00
4469cef647 Fixes cast statement format 2018-03-13 11:28:25 +00:00
4c4f6be59b Passes object as value instead of reference 2018-03-13 11:28:25 +00:00
e0f989f6a8 Revert "Migrate subscribers for all tasks types [MAILPOET-903]"
This reverts commit f1f69c9835.
2018-03-01 21:17:40 +03:00
f1f69c9835 Migrate subscribers for all tasks types [MAILPOET-903] 2018-02-28 11:21:23 +03:00
03015c0bde Fix code review syntax remarks [MAILPOET-903] 2018-02-26 16:30:53 +03:00
b9546b61a8 Fix acceptance tests, update counters [MAILPOET-903] 2018-02-14 19:57:14 +03:00
84dfa88a1a Don't load subscriber IDs in memory when preparing tasks from static segments [MAILPOET-903] 2018-02-13 20:36:01 +03:00
be6647d763 Fix unit tests [MAILPOET-903] 2018-02-13 11:39:50 +03:00
c0c57f6b67 Sending queue refactoring WIP [MAILPOET-903] 2018-02-13 11:39:50 +03:00
9526a6b470 Fix sending of scheduled standard email to dynamic segments [MAILPOET-1286] 2018-02-02 19:19:49 +03:00
a7a8cd2be4 Updates filter name 2018-01-16 08:20:29 -05:00
3bf800b51d Adds filter to set custom batch processing size 2018-01-14 12:39:16 -05:00
19c7efc9ef Pauses sending if processed subscribers list can't be updated 2018-01-09 12:25:04 +00:00
8afe7f5d97 Make rendering error during sending more descriptive [MAILPOET-1232] 2017-11-30 19:45:53 +03:00
16beda530a Fix post notifications to work with dynamic segments
[PREMIUM-38]
2017-10-18 10:08:04 +01:00
0271675cd0 Use dynamic segments for sending queue
[PREMIUM-38]
2017-10-18 10:08:04 +01:00
cc5227ca0d Don't track sent ALC posts for welcome and standard emails (always send the latest posts) [MAILPOET-1069] 2017-08-25 15:51:45 +03:00
de261d6179 Added confirmation when 'edit' is clicked 2017-08-15 12:55:05 +00:00
a587b0a966 Links are not re-hashed when re-rendering the same newsletter 2017-08-15 12:55:05 +00:00
7c30192a03 Adds option to replace shortcodes in one string using contents from
another string
Adds unit tests
2017-08-01 09:32:42 +02:00
90b93bd76e Merge pull request #1018 from mailpoet/prevent_sending_with_broken_newsletter_body
Prevents sending emails when rendered newsletter is broken [MAILPOET-1020]
2017-07-25 13:13:03 +03:00
9dd326e7db Updates class to use newly added validate() method on the model
Validates existing queue's rendered newsletter body
Cleans code formatting
2017-07-24 12:49:39 -04:00
7e6d900b53 Merge pull request #997 from mailpoet/scheduled_task_subscribers
Extract subscribers to a separate table in the Bounce worker [MAILPOET-987]
2017-07-24 17:14:38 +03:00
1a522794d6 Adds method to validate rendered newsletter body on sending queue
Prevents sending queue worker from sending when sending queue's rendered
newsletter body is invalid
2017-07-23 11:50:35 -04:00
b42d8e68d9 Rename removeSubscribers() method and encapsulate task completion logic [MAILPOET-987] 2017-07-20 11:22:47 +03:00
c924778d50 Rename unprocessed status, refactor counting a bit more clearly [MAILPOET-987] 2017-07-20 10:56:34 +03:00
34d09ce0c9 Sets mailer log error when queue cannot be saved during newsletter
pre-processing
2017-07-14 23:15:14 -04:00
55d3b67a2a Extract common and task-specific methods for subscribers [MAILPOET-940] 2017-07-13 13:27:28 +03:00
c02394b576 Prepare subscribers in the Bounce worker DB-side for performance reasons [MAILPOET-940] 2017-07-13 13:27:27 +03:00
6a9b8d88c2 Extract subscribers to a separate table in the Bounce worker [MAILPOET-940] 2017-07-13 13:27:27 +03:00
95b5206e8b Updates sending queue worker to set newsletter's sent_at field when
newsletter is sent
2017-07-07 11:05:39 -04:00