Revert "Migrate subscribers for all tasks types [MAILPOET-903]"

This reverts commit f1f69c9835.
This commit is contained in:
stoletniy
2018-03-01 21:17:40 +03:00
parent f1f69c9835
commit e0f989f6a8
2 changed files with 4 additions and 2 deletions

View File

@ -96,7 +96,7 @@ class Migration extends SimpleWorker {
global $wpdb;
$query = sprintf(
'SELECT queues.`task_id` FROM %1$s queues INNER JOIN %2$s tasks ON queues.`task_id` = tasks.`id` ' .
'WHERE tasks.`type` = "sending" ' .
'WHERE tasks.`type` = "sending" AND (tasks.`status` IS NULL OR tasks.`status` = "paused") ' .
'AND queues.`subscribers` != "" AND queues.`subscribers` != "N;"' .
'AND queues.`count_total` > (SELECT COUNT(*) FROM %3$s subs WHERE subs.`task_id` = queues.`task_id`)',
MP_SENDING_QUEUES_TABLE,