mirror of
https://github.com/wintercms/winter.git
synced 2024-06-28 05:33:29 +02:00
parent
539ad66b4b
commit
8010cf1084
@ -67,6 +67,22 @@ return [
|
||||
],
|
||||
],
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Job Batching
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| The following options configure the database and table that store job
|
||||
| batching information. These options can be updated to any database
|
||||
| connection and table which has been defined by your application.
|
||||
|
|
||||
*/
|
||||
|
||||
'batching' => [
|
||||
'database' => env('DB_CONNECTION', 'mysql'),
|
||||
'table' => 'job_batches',
|
||||
],
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Failed Queue Jobs
|
||||
|
@ -15,7 +15,7 @@ class CreateJob extends BaseScaffoldCommand
|
||||
protected $signature = 'create:job
|
||||
{plugin : The name of the plugin. <info>(eg: Winter.Blog)</info>}
|
||||
{name : The name of the job class to generate. <info>(eg: ImportPosts)</info>}
|
||||
{--s|sync : Overwrite existing files with generated files.}
|
||||
{--s|sync : Indicates that job should be synchronous.}
|
||||
{--f|force : Overwrite existing files with generated files.}
|
||||
{--uninspiring : Disable inspirational quotes}
|
||||
';
|
||||
|
@ -0,0 +1,33 @@
|
||||
<?php
|
||||
|
||||
use Winter\Storm\Database\Schema\Blueprint;
|
||||
use Winter\Storm\Database\Updates\Migration;
|
||||
|
||||
class DbJobsBatches extends Migration
|
||||
{
|
||||
public function up()
|
||||
{
|
||||
Schema::create($this->getTableName(), function (Blueprint $table) {
|
||||
$table->string('id')->primary();
|
||||
$table->string('name');
|
||||
$table->integer('total_jobs');
|
||||
$table->integer('pending_jobs');
|
||||
$table->integer('failed_jobs');
|
||||
$table->longText('failed_job_ids');
|
||||
$table->mediumText('options')->nullable();
|
||||
$table->integer('cancelled_at')->nullable();
|
||||
$table->integer('created_at');
|
||||
$table->integer('finished_at')->nullable();
|
||||
});
|
||||
}
|
||||
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists($this->getTableName());
|
||||
}
|
||||
|
||||
protected function getTableName()
|
||||
{
|
||||
return Config::get('queue.batching.table', 'job_batches');
|
||||
}
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user