🗃 Add batched jobs

Probably won't need it
This commit is contained in:
Dan Jones 2022-02-28 20:06:18 -06:00
commit b7f5ee034a
2 changed files with 39 additions and 7 deletions

View file

@ -42,18 +42,11 @@ return [
*/
'add' => [
\Illuminate\Queue\Console\BatchesTableCommand::class,
\Illuminate\Queue\Console\ClearCommand::class,
\Illuminate\Queue\Console\FlushFailedCommand::class,
\Illuminate\Queue\Console\ForgetFailedCommand::class,
\Illuminate\Queue\Console\ListFailedCommand::class,
\Illuminate\Queue\Console\MonitorCommand::class,
\Illuminate\Queue\Console\PruneBatchesCommand::class,
\Illuminate\Queue\Console\PruneFailedJobsCommand::class,
\Illuminate\Queue\Console\RestartCommand::class,
\Illuminate\Queue\Console\RetryBatchCommand::class,
\Illuminate\Queue\Console\RetryCommand::class,
\Illuminate\Queue\Console\WorkCommand::class,
],
/*

View file

@ -0,0 +1,39 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('job_batches', function (Blueprint $table) {
$table->string('id')->primary();
$table->string('name');
$table->integer('total_jobs');
$table->integer('pending_jobs');
$table->integer('failed_jobs');
$table->text('failed_job_ids');
$table->mediumText('options')->nullable();
$table->integer('cancelled_at')->nullable();
$table->integer('created_at');
$table->integer('finished_at')->nullable();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('job_batches');
}
};