Add cron queue migration and use it as default config

This commit is contained in:
Sam Georges 2014-07-03 18:34:33 +10:00
parent 7056397036
commit 4c419e2293
2 changed files with 34 additions and 2 deletions

View File

@ -11,11 +11,11 @@ return array(
| API, giving you convenient access to each back-end using the same
| syntax for each one. Here you may set the default queue driver.
|
| Supported: "sync", "beanstalkd", "sqs", "iron"
| Supported: "cron", "sync", "beanstalkd", "sqs", "iron"
|
*/
'default' => 'sync',
'default' => 'cron',
/*
|--------------------------------------------------------------------------
@ -30,6 +30,10 @@ return array(
'connections' => array(
'cron' => array(
'driver' => 'cron',
),
'sync' => array(
'driver' => 'sync',
),

View File

@ -0,0 +1,28 @@
<?php
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class DbCronQueue extends Migration
{
public function up()
{
Schema::create('cron_queue', function(Blueprint $table)
{
$table->engine = 'InnoDB';
$table->increments('id');
$table->integer('delay')->default(0);
$table->integer('status')->default(0);
$table->integer('retries')->default(0);
$table->text('payload')->nullable();
$table->timestamps();
});
}
public function down()
{
Schema::dropIfExists('cron_queue');
}
}