Commit Graph

660 Commits

Author SHA1 Message Date
Rostislav Wolny
699266c920 Use TrackingConfig and new tracking settings property in PHP
[MAILPOET-3185]
2021-12-06 17:03:28 +01:00
Jan Lysý
a3cd53e9c2 Use lower batchSize and move constant
[MAILPOET-3954]
2021-12-06 14:52:34 +01:00
Jan Lysý
1ef0d22ebb Use loop and add enforce execution limit
[MAILPOET-3954]
2021-12-06 14:52:34 +01:00
Jan Lysý
9bd6cb159c Sync subscribers sequentially from orders
[MAILPOET-3954]
2021-12-06 14:52:34 +01:00
Jan Lysý
ebf4ef3914 Run cron again when all customers aren't synced
[MAILPOET-3753]
2021-12-06 14:52:34 +01:00
Rodrigo Primo
6bea3873b5 Remove unused property Daemon::featureSwitch
This property became obsolete after
074d1ae07cbeaffffeb9c80fb83b32f548b5de97.

[MAILPOET-3859]
2021-11-29 16:23:13 +01:00
Rodrigo Primo
84209851e2 Remove re-engagement-email feature flag
[MAILPOET-3859]
2021-11-29 16:23:13 +01:00
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
Rostislav Wolny
8e5d7dd917 Unify conditions for triggering cron for subscribers stats report
Having a different condition in the worker checkRequirements was causing
that the cron was attempting to schedule the jog over and over again.
[MAILPOET-3970]
2021-11-23 12:55:01 +01:00
Rostislav Wolny
325173286e Fix stats reports checks in cron worker trigger
[MAILPOET-3948]
2021-11-17 10:15:28 +01:00
Rodrigo Primo
1501c4e54d Replace NewsletterLink with NewsletterLinkEntity in the class Tasks\Links
[MAILPOET-3816]
2021-11-15 13:03:47 +01:00
Rodrigo Primo
612eb1073d Move NewstetterLink properties to NewsletterLinkEntity
Doing this as part of the task to deprecated old Paris models
(NewsletterLink) and use Doctrine entities instead
(NewslleterLinkEntity).

[MAILPOET-3816]
2021-11-15 13:03:47 +01:00
Rostislav Wolny
b10bb31321 Add cron job for generating/re-generating template thumbnail files
[MAILPOET-2686]
2021-11-08 13:24:53 +01:00
Rostislav Wolny
f52d58f09d Add declare(strict_types=1); to newly added PHP files
[MAILPOET-3868]
2021-11-03 13:31:29 +01:00
Rostislav Wolny
8028ce9283 Add stats worker tasks checks to WordPress cron type trigger
[MAILPOET-3868]
2021-11-03 13:31:29 +01:00
Rostislav Wolny
ffe291c521 Add cron worker for reporting subscriber stats
[MAILPOET-3868]
2021-11-03 13:31:29 +01:00
Rostislav Wolny
c02cf639db Remove subscriber count reporting from MSS key check worker
[MAILPOET-3868]
2021-11-03 13:31:29 +01:00
Rostislav Wolny
73a9bed483 Replace deprecated doctrine methods in lib directory
[MAILPOET-3889]
2021-10-28 15:44:18 +02:00
Rodrigo Primo
ba15b9b251 Move ScheduledTask::findFutureScheduledByType() to ScheduledTasksRepository
Now that all other methods that use ScheduledTask::findByTypeAndStatus()
were moved to ScheduledTasksRepository, we can move
findFutureScheduledByType() as well and delete
ScheduledTask::findByTypeAndStatus().

[MAILPOET-3845]
2021-10-26 16:50:27 +02:00
Rodrigo Primo
498ceabc8c Refactor CronWorkerRunner to use Doctrine instead of Paris
[MAILPOET-3844]
2021-10-25 14:17:21 +02:00
Rodrigo Primo
2c78db9e04 Refactor ScheduledTasks::rescheduleProgressively() to use Doctrine
[MAILPOET-3844]
2021-10-25 14:17:21 +02:00
Rodrigo Primo
c6b008ba66 Refactor CronWorkerScheduler::reschedule() to use Doctrine
[MAILPOET-3844]
2021-10-25 14:17:21 +02:00
Pavel Dohnal
102e333521 Use Doctrine in WooCommercePastOrders cron worker
[MAILPOET-3814]
2021-10-25 13:08:17 +02:00
Pavel Dohnal
cfa87a165d Remove old outdated code
[MAILPOET-3814]
2021-10-25 13:08:17 +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
Rostislav Wolny
23278bd785 Add re-engagement email scheduling cron job and dummy scheduler
[MAILPOET-3782]
2021-10-18 16:21:52 +02:00
Rostislav Wolny
70e5f86be3 Fix Truncated incorrect DOUBLE error in SQL for last engagement date
The error was caused by comparing 0 with string dates.
[MAILPOET-3874]
2021-10-18 12:42:45 +02:00
Rodrigo Primo
58f29a0f42 Refactor SimpleWorker::proccessTaskStrategy() to use Doctrine
Replaces all instances of ScheduledTask with ScheduledTaskEntity

[MAILPOET-3843]
2021-10-05 13:21:53 +02:00
Rodrigo Primo
6ae1e0b400 Refactor WooCommercePastOrders::proccessTaskStrategy() to use Doctrine
Replaces all instances of ScheduledTask with ScheduledTaskEntity

[MAILPOET-3843]
2021-10-05 13:21:53 +02:00
Rodrigo Primo
77ca869d02 Refactor UnsubscribeTokens::proccessTaskStrategy() to use Doctrine
Replaces all instances of ScheduledTask with ScheduledTaskEntity

[MAILPOET-3843]
2021-10-05 13:21:53 +02:00
Rodrigo Primo
9041fdc0f8 Refactor SubscribersLastEngagement::proccessTaskStrategy() to use Doctrine
Replaces all instances of ScheduledTask with ScheduledTaskEntity

[MAILPOET-3843]
2021-10-05 13:21:53 +02:00
Rodrigo Primo
857dc95058 Refactor KeyCheckWorker::proccessTaskStrategy() to use Doctrine
Replaces all instances of ScheduledTask with ScheduledTaskEntity

[MAILPOET-3843]
2021-10-05 13:21:53 +02:00
Rodrigo Primo
8fcd84e03a Refactor InactiveSubscribers::proccessTaskStrategy() to use Doctrine
Replaces all instances of ScheduledTask with ScheduledTaskEntity

[MAILPOET-3843]
2021-10-05 13:21:53 +02:00
Rodrigo Primo
963da3bf16 Refactor the method processTaskStrategy() of some SimpleWorker child classes
This commit refactors the method processTaskStrategy() of some
SimpleWorker child classes to use Doctrine instead of Paris. In this
commit are included all the classes that it was only necessary to change
the method signature as they were receiving a ScheduledTask object as
the first parameter but didn't use it. Now they receive a
ScheduledTaskEntity object as the first param.

[MAILPOET-3843]
2021-10-05 13:21:53 +02:00
Rodrigo Primo
5803fef8cd Refactor Cron\Workers\Bounce to use ScheduledTaskEntity
[MAILPOET-3843]
2021-10-05 13:21:53 +02:00
Rodrigo Primo
57c80ea763 Change SimpleWorker::prepareTaskStrategy() to use Doctrine
This commit changes the method prepareTaskStrategy() in the class
SimpleWorker and all its child classes to use ScheduledTaskEntity
instead of ScheduledTask.

[MAILPOET-2996]
2021-10-04 13:25:44 +02:00
Rodrigo Primo
e69a3f9a53 Migrate method findCompletedByType() to Doctrine
[MAILPOET-2996]
2021-10-04 13:25:44 +02:00
Rodrigo Primo
60ae98e09c Helper method to support migration from Paris to Doctrine
This commit adds a helper method called convertTaskClass() to
CronWorkerRunner to support the migration of the code inside this class
from Paris to Doctrine. This method receives a ScheduledTaskEntity and
returns a ScheduledTask. It will be remove once the migration is
finished.

[MAILPOET-2996]
2021-09-29 13:53:27 +02:00
Rodrigo Primo
65eef3dfbe Migrate methods findDueByType() and findRunningByType() to Doctrine
[MAILPOET-2996]
2021-09-29 13:53:27 +02:00
Pavel Dohnal
21839fc30b Fix indentation of multiline function declarations
[MAILPOET-3732]
2021-09-17 12:17:36 +02:00
Pavel Dohnal
cdda3480ca Make all constructor signatures multiline
[MAILPOET-3732]
2021-09-16 14:19:40 +02:00
Rostislav Wolny
2619f9cdda Fix Truncated incorrect DOUBLE error in SQL for last engagement date
The error was caused by comparing 0 with string dates.
[MAILPOET-3795]
2021-09-13 12:56:59 +02:00
Pavel Dohnal
6f66fba66f Fix return type
[MAILPOET-3765]
2021-09-13 10:19:15 +02:00
Pavel Dohnal
1f6836dae6 Save bounces statistics
[MAILPOET-3765]
2021-09-13 10:19:15 +02:00
Pavel Dohnal
a303b4f04e Process queues to save statistics
[MAILPOET-3765]
2021-09-13 10:19:15 +02:00
Pavel Dohnal
db04687f3c Refactor to Doctrine
[MAILPOET-3765]
2021-09-13 10:19:15 +02:00
Pavel Dohnal
6f28228c55 Stop using a deprecated function
[MAILPOET-3765]
2021-09-13 10:19:15 +02:00
Rostislav Wolny
c2c383e0b5 Add method for immediate scheduling/rescheduling cron tasks
[MAILPOET-3726]
2021-09-08 16:12:37 +02:00
Rostislav Wolny
1c4eb15f93 Refactor CronWorkerScheduler to Doctrine
[MAILPOET-3726]
2021-09-08 16:12:37 +02:00