failed jobs

This commit is contained in:
邓皓元 2018-11-19 09:28:13 +08:00
parent 3529737b72
commit f722eaee8e
4 changed files with 42 additions and 0 deletions

View File

@ -20,6 +20,11 @@ class Command extends BaseCommand
protected function execute(InputInterface $input, OutputInterface $output)
{
$this->line('开始'.$this->description);
set_time_limit(0);
ini_set('memory_limit', '4096m');
ini_set('default_socket_timeout', -1);
parent::execute($input, $output);
}

View File

@ -0,0 +1,35 @@
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateFailedJobsTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('failed_jobs', function (Blueprint $table) {
$table->bigIncrements('id');
$table->text('connection');
$table->text('queue');
$table->longText('payload');
$table->longText('exception');
$table->timestamp('failed_at')->useCurrent();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('failed_jobs');
}
}

View File

@ -9,6 +9,7 @@ return array(
'AccountSeeder' => $baseDir . '/database/seeds/AccountSeeder.php',
'ArithmeticError' => $vendorDir . '/symfony/polyfill-php70/Resources/stubs/ArithmeticError.php',
'AssertionError' => $vendorDir . '/symfony/polyfill-php70/Resources/stubs/AssertionError.php',
'CreateFailedJobsTable' => $baseDir . '/database/migrations/2018_11_16_190020_create_failed_jobs_table.php',
'DatabaseSeeder' => $baseDir . '/database/seeds/DatabaseSeeder.php',
'DivisionByZeroError' => $vendorDir . '/symfony/polyfill-php70/Resources/stubs/DivisionByZeroError.php',
'Error' => $vendorDir . '/symfony/polyfill-php70/Resources/stubs/Error.php',

View File

@ -686,6 +686,7 @@ class ComposerStaticInite79258a3e34ad3e251999111d9f334d9
'AccountSeeder' => __DIR__ . '/../..' . '/database/seeds/AccountSeeder.php',
'ArithmeticError' => __DIR__ . '/..' . '/symfony/polyfill-php70/Resources/stubs/ArithmeticError.php',
'AssertionError' => __DIR__ . '/..' . '/symfony/polyfill-php70/Resources/stubs/AssertionError.php',
'CreateFailedJobsTable' => __DIR__ . '/../..' . '/database/migrations/2018_11_16_190020_create_failed_jobs_table.php',
'DatabaseSeeder' => __DIR__ . '/../..' . '/database/seeds/DatabaseSeeder.php',
'DivisionByZeroError' => __DIR__ . '/..' . '/symfony/polyfill-php70/Resources/stubs/DivisionByZeroError.php',
'Error' => __DIR__ . '/..' . '/symfony/polyfill-php70/Resources/stubs/Error.php',