diff --git a/scripts/mail/create_worker_tasks.php b/scripts/mail/create_worker_tasks.php new file mode 100755 index 0000000000..8d6c805663 --- /dev/null +++ b/scripts/mail/create_worker_tasks.php @@ -0,0 +1,46 @@ +#!/usr/bin/env php +loadAllWhere( + 'status = %s', PhabricatorMetaMTAMail::STATUS_QUEUE); + +foreach ($messages as $message) { + if (!$message->getWorkerTaskID()) { + $mailer_task = new PhabricatorWorkerTask(); + $mailer_task->setTaskClass('PhabricatorMetaMTAWorker'); + $mailer_task->setData($message->getID()); + $mailer_task->save(); + + $message->setWorkerTaskID($mailer_task->getID()); + $message->save(); + $id = $message->getID(); + echo "#$id\n"; + } +}