自动推广

This commit is contained in:
wangjinlei
2026-03-23 09:57:45 +08:00
parent d1e0f43992
commit 20a68ddc8a
4 changed files with 508 additions and 20 deletions

View File

@@ -13,22 +13,22 @@ class PromotionSend
$service = new PromotionService();
if (!$taskId) {
$service->log('[PromotionSend] missing task_id, job deleted');
// $service->log('[PromotionSend] missing task_id, job deleted');
$job->delete();
return;
}
try {
// try {
$result = $service->processNextEmail($taskId);
$service->log('[PromotionSend] task=' . $taskId . ' result=' . json_encode($result));
// $service->log('[PromotionSend] task=' . $taskId . ' result=' . json_encode($result));
if (!empty($result['done'])) {
$reason = isset($result['reason']) ? $result['reason'] : '';
$service->log('[PromotionSend] task=' . $taskId . ' finished, reason=' . $reason);
}
} catch (\Exception $e) {
$service->log('[PromotionSend] task=' . $taskId . ' exception=' . $e->getMessage());
}
// if (!empty($result['done'])) {
// $reason = isset($result['reason']) ? $result['reason'] : '';
// $service->log('[PromotionSend] task=' . $taskId . ' finished, reason=' . $reason);
// }
// } catch (\Exception $e) {
// $service->log('[PromotionSend] task=' . $taskId . ' exception=' . $e->getMessage());
// }
$job->delete();
}