Laravel 5.3 中文文档$request) { // 创建播客 $job = (new ProcessPodcast($podcast))->onQueue('processing'); dispatch($job); } } 委派到指定的连接 如果你的项目使用多个连接来管理队列,那么你会用到委派任务到指定的连接。请在任务实例使 ProcessPodcast($podcast)) ->onConnection('sqs') ->onQueue('processing'); 本文档由 Laravel 学院(LaravelAcademy.org)提供 Laravel 学院致力于提供优质 Laravel 中文学习资源 396 处理错误 成后才会开始在第二台服务器运行。如果你想要在多个服务器上平行运行,添加 parallel 选项 到任务声明: @servers(['web-1' => '192.168.1.1', 'web-2' => '192.168.1.2']) @task('deploy', ['on' => ['web-1', 'web-2'], 'parallel' => true]) cd site0 码力 | 691 页 | 9.37 MB | 1 年前3
Laravel 5.6 中文文档$request) { // Create podcast... ProcessPodcast::dispatch($podcast)->onQueue('processing'); } } 分发到指定的连接 如果你使用了多个连接来管理队列,那么可以分发任务到指定的连接。请在任务实例中使用 onConnection 方法来指定连接: onConnection('sqs') ->onQueue('processing'); 指定最大失败次数/超时时间 最大失败次数 指定队列任务最大失败次数的一种实现方式是通过 Artisan 命令 --tries 切换: php artisan queue:work 第二台服务器运行。如果你想要在多 个服务器上平行运行,添加 parallel 选项到任务声明: @servers(['web-1' => '192.168.1.1', 'web-2' => '192.168.1.2']) @task('deploy', ['on' => ['web-1', 'web-2'], 'parallel' => true]) cd site git0 码力 | 377 页 | 14.56 MB | 1 年前3
Laravel 5.1 中文文档2.1 平行运行 如果你想要在多个服务器上平行运行,添加 parallel 选项到任务声明: @servers(['web-1' => '192.168.1.1', 'web-2' => '192.168.1.2']) @task('deploy', ['on' => ['web-1', 'web-2'], 'parallel' => tru e]) cd site0 码力 | 307 页 | 3.46 MB | 1 年前3
Laravel 5.2 中文文档运行完成后才会开始在第二台服务器运行。 平行运行 如果你想要在多个服务器上平行运行,添加 parallel 选项到任务声明: @servers(['web-1' => '192.168.1.1', 'web-2' => '192.168.1.2']) @task('deploy', ['on' => ['web-1', 'web-2'], 'parallel' => tru e]) cd site0 码力 | 377 页 | 4.56 MB | 1 年前3
Laravel 5.0 Documentation
build queued jobs in Laravel. So, how do we instruct command bus to queue our job for background processing instead of running it synchronously? It's easy. Firstly, when generating a new command, just add When you dispatch it to the bus that bus will automatically queue the command for background processing. It doesn't get any easier than that. For more information on interacting with queued commands provides a unified API across a variety of different queue services. Queues allow you to defer the processing of a time consuming task, such as sending an e-mail, until a later time, thus drastically speeding0 码力 | 242 页 | 1.44 MB | 1 年前3
Learning Laravelthrough the first parameter (in the following examples, as $carry). This method can do a lot of processing on large data sets. For example the following examples, we will use the following example student com", "Webmaster"); }); } } // Pass the error on to continue processing return parent::report($e); } The view for the email ("emails.exception_notif") is below expressive way to create, edit, and compose images and supports currently the two most common image processing libraries GD Library and Imagick. Read more about this here Laravel generator Get your APIs0 码力 | 216 页 | 1.58 MB | 1 年前3
Laravel 6.0 中文文档onQueue 方法来指定任务 的连接和队列: $job = (new ProcessPodcast($podcast)) ->onConnection('sqs') ->onQueue('processing'); 此外,你还可以在任务类中通过 connection 属性指定连接: parallel 选项到任务声明: @servers(['web-1' => '192.168.1.1', 'web-2' => '192.1 68.1.2']) @task('deploy', ['on'0 码力 | 1442 页 | 14.66 MB | 1 年前3
共 7 条
- 1













