...點(diǎn),你可以在你的任務(wù)類中定義一個(gè) maxExceptions 屬性:<?php namespace App\Jobs; class ProcessPodcast implements ShouldQueue { /** * 任務(wù)可嘗試的次數(shù) * * @var int */ public $tries = 25; /** * 任務(wù)失敗前允許的最大異常數(shù) * * @var int */ public $maxExceptions = 3;...
http://m.o2fo.com/laravel_8/laravel_8-v38h3huh.html...的訪問,該方法可用于檢索任務(wù)當(dāng)前執(zhí)行的批處理:<?php namespace App\Jobs; use App\Models\Podcast; use App\Services\AudioProcessor; use Illuminate\Bus\Batchable; use Illuminate\Bus\Queueable; use Illuminate\Contracts\Queue\ShouldQueue; use Illuminate\Foundation\Bus\Dispatchabl...
http://m.o2fo.com/laravel_8/laravel_8-bc5t3hum.html為了方便操作,Laravel 提供了一個(gè) Artisan 命令 queue:retry-batch,該命令可以讓你輕松重試批處理中所有失敗的任務(wù)。queue:retry-batch 命令接收需要重試失敗任務(wù)的批處理的 UUID :php artisan queue:retry-batch 32dbc76c-4f82-4749-b610-a639fe0099b5
http://m.o2fo.com/laravel_8/laravel_8-3bu13huv.html--stop-when-empty 參數(shù)可以指定任務(wù)處理器處理所有任務(wù)后關(guān)閉。如果您希望在隊(duì)列為空后關(guān)閉該容器,請(qǐng)?jiān)?Docker 容器中處理 Laravel 隊(duì)列時(shí)使用此選項(xiàng):php artisan queue:work --stop-when-empty
http://m.o2fo.com/laravel_8/laravel_8-lr413hv1.html--max-time 參數(shù)可以指定任務(wù)處理器處理了多少秒后關(guān)閉。這個(gè)參數(shù)可以用來結(jié)合 Supervisor 設(shè)置任務(wù)處理器執(zhí)行多少秒后重啟:// 一小時(shí)后關(guān)閉 php artisan queue:work --max-time=3600
http://m.o2fo.com/laravel_8/laravel_8-r9ot3hv2.html...過執(zhí)行 queue:restart 命令來優(yōu)雅地重新啟動(dòng)所有的 worker:php artisan queue:restart 該命令將指示所有隊(duì)列 worker 在完成當(dāng)前任務(wù)后優(yōu)雅地 “死亡”,這樣就不會(huì)丟失現(xiàn)有的任務(wù)。由于在執(zhí)行 queue:restart 命令時(shí),隊(duì)列 worker 將被殺掉,因...
http://m.o2fo.com/laravel_8/laravel_8-3kfq3hv4.html在你的 config/queue.php 配置文件,每個(gè)隊(duì)列連接定義一個(gè) retry_after 選項(xiàng)。此選項(xiàng)指定在重試正在處理的任務(wù)之前,隊(duì)列連接應(yīng)等待多少秒。例如,如果 retry_after 的值被設(shè)置為 90,那么如果任務(wù)已經(jīng)處理了 90 秒而沒有被刪除,那么...
http://m.o2fo.com/laravel_8/laravel_8-ce1i3hv6.html...。 --timeout 選項(xiàng)用來刪除超過指定時(shí)間限制的凍結(jié)進(jìn)程:php artisan queue:work --timeout=60 retry_after 配置選項(xiàng)和 --timeout CLI 選項(xiàng)是不同的,但它們共同確保不會(huì)丟失任務(wù),并且任務(wù)只被成功處理一次。 注意:--timeout 值應(yīng)該總是比 retry_a...
http://m.o2fo.com/laravel_8/laravel_8-iwlo3hv7.html...任何新任務(wù) —— 這些任務(wù)將在 worker 再次醒來后處理。php artisan queue:work --sleep=3
http://m.o2fo.com/laravel_8/laravel_8-4snk3hv8.html...am:laravel-worker] process_name=%(program_name)s_%(process_num)02d command=php /home/forge/app.com/artisan queue:work sqs --sleep=3 --tries=3 autostart=true autorestart=true user=forge numprocs=8 redirect_stderr=true stdout_logfile=/home/forge/app.com/worker.log stopwaitsecs=3600 在本例中, num...
http://m.o2fo.com/laravel_8/laravel_8-6eur3hvb.html抱歉,暫時(shí)沒有相關(guān)的微課
w3cschool 建議您:
抱歉,暫時(shí)沒有相關(guān)的視頻課程
w3cschool 建議您:
抱歉,暫時(shí)沒有相關(guān)的教程
w3cschool 建議您:
...點(diǎn),你可以在你的任務(wù)類中定義一個(gè) maxExceptions 屬性:<?php namespace App\Jobs; class ProcessPodcast implements ShouldQueue { /** * 任務(wù)可嘗試的次數(shù) * * @var int */ public $tries = 25; /** * 任務(wù)失敗前允許的最大異常數(shù) * * @var int */ public $maxExceptions = 3;...
http://m.o2fo.com/laravel_8/laravel_8-v38h3huh.html...的訪問,該方法可用于檢索任務(wù)當(dāng)前執(zhí)行的批處理:<?php namespace App\Jobs; use App\Models\Podcast; use App\Services\AudioProcessor; use Illuminate\Bus\Batchable; use Illuminate\Bus\Queueable; use Illuminate\Contracts\Queue\ShouldQueue; use Illuminate\Foundation\Bus\Dispatchabl...
http://m.o2fo.com/laravel_8/laravel_8-bc5t3hum.html為了方便操作,Laravel 提供了一個(gè) Artisan 命令 queue:retry-batch,該命令可以讓你輕松重試批處理中所有失敗的任務(wù)。queue:retry-batch 命令接收需要重試失敗任務(wù)的批處理的 UUID :php artisan queue:retry-batch 32dbc76c-4f82-4749-b610-a639fe0099b5
http://m.o2fo.com/laravel_8/laravel_8-3bu13huv.html--stop-when-empty 參數(shù)可以指定任務(wù)處理器處理所有任務(wù)后關(guān)閉。如果您希望在隊(duì)列為空后關(guān)閉該容器,請(qǐng)?jiān)?Docker 容器中處理 Laravel 隊(duì)列時(shí)使用此選項(xiàng):php artisan queue:work --stop-when-empty
http://m.o2fo.com/laravel_8/laravel_8-lr413hv1.html--max-time 參數(shù)可以指定任務(wù)處理器處理了多少秒后關(guān)閉。這個(gè)參數(shù)可以用來結(jié)合 Supervisor 設(shè)置任務(wù)處理器執(zhí)行多少秒后重啟:// 一小時(shí)后關(guān)閉 php artisan queue:work --max-time=3600
http://m.o2fo.com/laravel_8/laravel_8-r9ot3hv2.html...過執(zhí)行 queue:restart 命令來優(yōu)雅地重新啟動(dòng)所有的 worker:php artisan queue:restart 該命令將指示所有隊(duì)列 worker 在完成當(dāng)前任務(wù)后優(yōu)雅地 “死亡”,這樣就不會(huì)丟失現(xiàn)有的任務(wù)。由于在執(zhí)行 queue:restart 命令時(shí),隊(duì)列 worker 將被殺掉,因...
http://m.o2fo.com/laravel_8/laravel_8-3kfq3hv4.html在你的 config/queue.php 配置文件,每個(gè)隊(duì)列連接定義一個(gè) retry_after 選項(xiàng)。此選項(xiàng)指定在重試正在處理的任務(wù)之前,隊(duì)列連接應(yīng)等待多少秒。例如,如果 retry_after 的值被設(shè)置為 90,那么如果任務(wù)已經(jīng)處理了 90 秒而沒有被刪除,那么...
http://m.o2fo.com/laravel_8/laravel_8-ce1i3hv6.html...。 --timeout 選項(xiàng)用來刪除超過指定時(shí)間限制的凍結(jié)進(jìn)程:php artisan queue:work --timeout=60 retry_after 配置選項(xiàng)和 --timeout CLI 選項(xiàng)是不同的,但它們共同確保不會(huì)丟失任務(wù),并且任務(wù)只被成功處理一次。 注意:--timeout 值應(yīng)該總是比 retry_a...
http://m.o2fo.com/laravel_8/laravel_8-iwlo3hv7.html...任何新任務(wù) —— 這些任務(wù)將在 worker 再次醒來后處理。php artisan queue:work --sleep=3
http://m.o2fo.com/laravel_8/laravel_8-4snk3hv8.html...am:laravel-worker] process_name=%(program_name)s_%(process_num)02d command=php /home/forge/app.com/artisan queue:work sqs --sleep=3 --tries=3 autostart=true autorestart=true user=forge numprocs=8 redirect_stderr=true stdout_logfile=/home/forge/app.com/worker.log stopwaitsecs=3600 在本例中, num...
http://m.o2fo.com/laravel_8/laravel_8-6eur3hvb.html抱歉,暫時(shí)沒有相關(guān)的文章
w3cschool 建議您: