Commit Graph

90 Commits

Author SHA1 Message Date
Rostislav Wolny
6f5cde2fbf Update counts of sending queue when triggering post notification
When we trigger post notification sending we used to create post notification history record,
save all scheduled task subscribers but didn't update counts on queue.
Counts were eventually updated when sending started. This was causing some issues e.g. when sending
got stuck post notification item was showing 0/0 in sending status.
Pausing/resuming such a post notification caused that it was immediately set as sent.

This commit adds updating counts in queue immediately when sending starts.
[MAILPOET-3962]
2021-11-23 13:39:51 +01:00
Rodrigo Primo
2c78db9e04 Refactor ScheduledTasks::rescheduleProgressively() to use Doctrine
[MAILPOET-3844]
2021-10-25 14:17:21 +02:00
Rostislav Wolny
4b8abf1148 Add support for re-engagement email to scheduler worker
[MAILPOET-3782]
2021-10-18 16:21:52 +02:00
Rostislav Wolny
550077800e Use newsletter entity constants in scheduler worker
[MAILPOET-3782]
2021-10-18 16:21:52 +02:00
Pavel Dohnal
f66721ed1b Make sure the user exists in WP
[MAILPOET-2716]
2020-04-24 11:44:09 +02:00
Pavel Dohnal
f59003bdde Make sure Newsletter is the right type
[MAILPOET-2716]
2020-04-24 11:44:09 +02:00
Pavel Dohnal
8d9195b585 Schedule automatic emails to unconfirmed subscribers
[MAILPOET-2799]
2020-04-02 14:24:38 +02:00
Jan Jakeš
ecc1d68b5b Check if bounce sync is scheduled within 42 hours for all emails when sending
[MAILPOET-2705]
2020-02-20 17:34:07 +00:00
Jan Jakeš
1774b48666 Autofix unused "use" statements
[MAILPOET-2715]
2020-02-19 19:12:53 +00:00
Jan Jakeš
8c848cfa28 Convert property names to camel case
[MAILPOET-1796]
2020-01-14 15:22:42 +01:00
Jan Jakeš
54549ff037 Convert variable names to camel case
[MAILPOET-1796]
2020-01-14 15:22:42 +01:00
Amine Ben hammou
43df66d162 Add public keyword to methods
[MAILPOET-2413]
2019-12-26 18:09:45 +03:00
Jan Jakeš
07fc94f046 Fix Carbon-related problems reported by PHPStan
[MAILPOET-2560]
2019-12-15 21:55:48 +00:00
Jan Jakeš
0e964de6d4 Move nesbot/carbon to vendor-prefixed
[MAILPOET-2560]
2019-12-15 21:55:48 +00:00
Jan Jakeš
382df5e034 Pass cron worker timer in process() method instead of a constructor
[MAILPOET-2538]
2019-11-25 12:30:18 +00:00
Jan Jakeš
ba41f4901e Move SQL queries from SimpleWorker to model, improve naming
[MAILPOET-2538]
2019-11-25 12:30:18 +00:00
wxa
81caa04479 Use CronHelper service in cron workers [MAILPOET-2459] 2019-11-06 09:58:36 +00:00
Rostislav Wolny
73bc62227a Replace log topics strings by constants
[MAILPOET-2444]
2019-10-10 12:36:06 +01:00
Rostislav Wolny
e4262b0a6d Refactor Cron to use logger_factory instance
[MAILPOET-2444]
2019-10-10 12:36:06 +01:00
Rostislav Wolny
beccbea6e2 Refactor Mailpoet\Logging\Logger to LoggerFactory
[MAILPOET-2444]
2019-10-10 12:36:06 +01:00
Pavel Dohnal
11b2516d99 Make sure only subscribed users recieve welcome emails
[MAILPOET-2331]
2019-09-19 16:18:26 +02:00
Jan Jakeš
01a0fe96c4 Remove no longer necessary checks
[MAILPOET-1948]
2019-09-12 13:59:32 +02:00
Pavel Dohnal
493e16606c Move constans to their classes
[MAILPOET-2348]
2019-09-11 19:16:21 +01:00
wxa
8b867a7b4f Reschedule failing cron tasks progressively [MAILPOET-2181] 2019-08-01 13:09:18 -04:00
Pavel Dohnal
e1e96d0c12 Reschedule bounce task
[MAILPOET-2100]
2019-06-21 11:33:08 -04:00
Pavel Dohnal
7163ee6430 Refactor Scheduler to use DI
[MAIPOET-2100]
2019-06-21 11:33:08 -04:00
Ján Mikláš
3ee58aea10 Add space between if and ‘(‘
[MAILPOET-1791]
2019-02-13 08:26:27 -05:00
Ján Mikláš
a935b091d3 Add space between elseif/else if and ‘(‘
[MAILPOET-1791]
2019-02-13 08:26:27 -05:00
Ján Mikláš
ebbdec5ebd Add space between foreach and ‘(‘
[MAILPOET-1791]
2019-02-13 08:26:27 -05:00
Amine Ben hammou
a46d98ec44 Refactor WPFunctions to be injectable with DI 2018-12-12 16:43:52 +01:00
wxa
467bef1d61 Do not require pluggable.php [MAILPOET-1650] 2018-11-22 17:01:33 +03:00
Rostislav Wolný
b45c47a9e7 Update SubscriberFinder and Scheduler to use object entities
[MAILPOET-1495]
2018-10-12 11:26:23 +02:00
Pavel Dohnal
e4db455a47 Add post notification logging
[MAILPOET-1536]
2018-10-01 15:02:12 +02:00
Rostislav Wolny
9308cffd45 Refactor fetching newsletter options to respect its type [MAILPOET-1431] 2018-06-19 17:06:56 +02:00
Vlad
dde03e0ae6 Adds missing import after merge conflict resolution 2018-06-11 13:48:59 -04:00
Vlad
6d74ba8bb0 Validates that subscriber exists when processing automatic email 2018-06-11 13:40:05 -04:00
Vlad
b75d4db412 Adds newsletter/cron scheduler for automatic emails 2018-06-11 13:38:11 -04:00
Pavel Dohnal
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
Tautvidas Sipavičius
a588e95762 Add a limit to fetch 5 scheduled tasks at a time [MAILPOET-1366] 2018-05-02 23:27:30 +03:00
Vlad
467cf350e9 Abstract WP's current_time() function in the code base 2018-03-20 16:34:50 -04:00
stoletniy
b9546b61a8 Fix acceptance tests, update counters [MAILPOET-903] 2018-02-14 19:57:14 +03:00
stoletniy
84dfa88a1a Don't load subscriber IDs in memory when preparing tasks from static segments [MAILPOET-903] 2018-02-13 20:36:01 +03:00
stoletniy
c0c57f6b67 Sending queue refactoring WIP [MAILPOET-903] 2018-02-13 11:39:50 +03:00
stoletniy
9526a6b470 Fix sending of scheduled standard email to dynamic segments [MAILPOET-1286] 2018-02-02 19:19:49 +03:00
Pavel Dohnal
16beda530a Fix post notifications to work with dynamic segments
[PREMIUM-38]
2017-10-18 10:08:04 +01:00
Vlad
2d3aae9dd0 Fixes queue not being processed for scheduled newsletters
Sets newsletter status to "sending" when queue was processed
Uses defined constants where appropriate
2017-06-15 19:11:35 -04:00
Vlad
ea831ef160 Prevents processing scheduled sending queues for inactive newsletters 2017-06-01 19:50:25 -04:00
Vlad
66d039ace3 Catches exception thrown by cron dependency and prevents a fatal error 2017-02-27 19:21:32 -05:00
Vlad
e7698b0131 Optimizes DB query and result processing code 2017-02-15 10:02:13 -05:00
Vlad
440b7e4e6c Fixes DB query that returns large result set when there are thousands of
subscribers
2017-02-14 21:07:40 -05:00