Tag: queue
-
Post Views: 19 1. In Laravel 9, a list of APIs has now been implemented, which is based on Spatie\QueryBuilder\QueryBuilder to easily build Eloquent queries from API requests. However, now you need to implement a function of exporting Excel on the list page, planned to be implemented in asynchronous queues. So, if you want to reuse the code that built…
-
Post Views: 21 1. Reference:In Laravel 6, during the execution of the queue, the execution of each task will execute view::addLocation($location); however, each task will only take the $location of the first task. . However, it is found that there are still problems in the subsequent production environment. During queue execution, some view files are not executed (“Setting_Migrations”:[]). as shown…
-
Post Views: 17 1. The json field is stored in the array format, the value example:[249, 247, 250, 244, 243, 255, 246, 245, 257, 248, 259, 252, 256]. as shown in Figure 1 2. The existing code running in the queue job is implemented as follows, the generated SQL is as follows 3. Since the queue tasks can be run…
-
Post Views: 20 1. Reference:filemTime(): stat failed for /var/www/object/storage/app/theme_downloads/2023/07/19/16 89733510.7774.265283535/migrations/migrate_cart.blade.php 2. Reference:In Laravel 6, after binding a singleton in the service container, how to reset the parameters of the constructor of the singleton when parsing? 3. The source of the error report is that during the execution of the queue, the execution of each task will execute view::addLocation($location); however, the…
-
Post Views: 17 1. In Laravel 6, in the queue task, when the maximum number of tasks that the task can try is greater than 1, it fails on the second run: Must be an instance of app\models\theme, null given. The reason is that the queue task does not support trying again. as shown in Figure 1 2. When the…
-
Post Views: 17 1. In Laravel 6, in the terminal, you can confirm that the queue has been executed. as shown in Figure 1 2. However, in Laravel Telescope, the status of the queuing job still shows that it is not finished. as shown in Figure 2 3. It is suspected that after updating Telescope, there is no reconfiguration and…
-
Post Views: 21 1. In a queue task, you need to download the zip file first, and then decompress it. Now, after the decompression is successful, you need to delete the downloaded zip file. Now implemented. 2. When the decompression fails: call to undefined function modules\themestoredb\handlers\checkhere(), you also need to delete the corresponding zip file, you need to Failed(Exception $Exception)…
-
Post Views: 20 1. Use the following Artisan command to generate a new queue task for the specified module. as shown in Figure 1 2. Task distribution, push tasks to the queue 3. Edit /modules/themestoredb/jobs/themeinstallation.php . The processing example in the queue is mainly to change the value of the field step of the table Theme_Installation_Task to 2. 4. Start…