Commit Graph

309 Commits

Author SHA1 Message Date
a46d98ec44 Refactor WPFunctions to be injectable with DI 2018-12-12 16:43:52 +01:00
0e4de4197d Merge pull request #1651 from mailpoet/array-column-fix
User polyfill for array_column [MAILPOET-1618]
2018-11-27 07:51:31 -05:00
a9f3eeeb0d User polyfill for array_column
[MAILPOET-1618]
2018-11-27 11:13:00 +01:00
wxa
467bef1d61 Do not require pluggable.php [MAILPOET-1650] 2018-11-22 17:01:33 +03:00
8557cbccb1 Refactor SimpleWorker to be more expressive (so PHPStan understands it) 2018-11-15 11:41:04 +01:00
fff8176a49 Refactor lib/Router to use with container for endpoints
[MAILPOET-1605]
2018-10-31 17:26:47 +01:00
1e7542848a Merge pull request #1556 from mailpoet/arrays-to-objects
Replace entity arrays with objects [MAILPOET-1495]
2018-10-22 14:59:12 -04:00
fd893cec0e Remove newsletter logging where is no newsletter
[MAILPOET-1595]
2018-10-18 09:07:32 +02:00
b45c47a9e7 Update SubscriberFinder and Scheduler to use object entities
[MAILPOET-1495]
2018-10-12 11:26:23 +02:00
9ec6f52098 Merge pull request #1526 from mailpoet/linux-cron
Linux cron [MAILPOET-1538]
2018-10-08 06:41:57 -04:00
b2e2087cfc Split cron daemon into 2 classes
[MAILPOET-1538]
2018-10-04 08:27:31 +02:00
f81323ad52 Rename Daemon to DaemonHttpRunner
[MAILPOET-1538]
2018-10-03 10:28:26 +02:00
e4db455a47 Add post notification logging
[MAILPOET-1536]
2018-10-01 15:02:12 +02:00
5d1f3153cd Add Linux Cron Script
[MAILPOET-1538]
2018-09-27 16:51:44 +02:00
fcd8509cef Add linux cron option to settings
[MAILPOET-1538]
2018-09-27 15:08:56 +02:00
665fce9dbb Temporarily set every sending error to hard
This is temporary solution until we implement follow-up feature https://mailpoet.atlassian.net/browse/MAILPOET-1155

[MAILPOET-1154]
2018-09-13 11:12:38 +02:00
624c6d900e Add processing of soft errors
When processing soft error we only save error to particular subscriber and continue sending.

[MAILPOET-1154]
2018-09-13 11:12:38 +02:00
ea4c5f46fb Refactor sendingQueue to distinguish bulk/individual sending method
[MAILPOET-1154]
2018-09-13 11:12:38 +02:00
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
8ea06f3f31 Use POST for cron requests
[MAILPOET-1485]
2018-08-16 08:27:05 +02:00
659f748dc9 Add cache headers to cron endpoints
[MAILPOET-1464]
2018-08-09 14:08:04 +02:00
a3b79a6907 Fix overriding cron token 2018-07-31 17:48:26 +02:00
3184b43b3b Add status flag for cron deactivation
Cron daemon, which was triggered by WordPress method, was deactivated
by deletion from DB and it caused the lost of all log data about it.
This commit changes the implementation so that the daemon is deactivated by changing status flag.

[MAILPOET-1457]
2018-07-25 13:23:21 +02:00
65e49808c0 Merge pull request #1430 from mailpoet/improve-errors
Improve error reporting for MSS sending [MAILPOET-1445]
2018-07-23 11:16:53 -04:00
27b9857e6a Improve error reporting for MSS sending
[MAILPOET-1445]
2018-07-19 16:21:23 +01:00
3c7cd193b6 Detect not accessible cron daemon [MAILPOET-801]
This adds a function to a CronHelper which detect accessibility problem based on timestamps
which are stored during cron execution. The main idea is that the cron daemon should update run_started_at
within the REQUEST_TIMEOUT after it was accessed (run_accessed_at).
2018-07-11 09:27:19 +02:00
083372a391 Store timestamps and last error during cron process [MAILPOET-801] 2018-07-11 09:27:14 +02: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
51d97ddda8 Fix sending on slow hosts
[MAILPOET-1322]
2018-04-06 22:09:07 -04:00
511e07455f Fix migration task to be done only when one hasn't been done
[MAILPOET-1333]
2018-03-21 11:21:23 +02: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