Skip to content

Commit a8ecd89

Browse files
committed
Support microtime for logging
1 parent 940f8d9 commit a8ecd89

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

migrations/2017_01_01_000000_create_queue_monitor_table.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,12 @@ class CreateQueueMonitorTable extends Migration
1313
public function up()
1414
{
1515
Schema::create('queue_monitor', function (Blueprint $table) {
16-
$table->increments('id');
16+
$table->bigIncrements('id');
1717
$table->string('job_id')->index();
1818
$table->string('name')->nullable();
1919
$table->string('queue')->nullable();
20-
$table->timestamp('started_at')->nullable()->index();
21-
$table->timestamp('finished_at')->nullable();
20+
$table->timestamp('started_at', 6)->nullable()->index();
21+
$table->timestamp('finished_at', 6)->nullable();
2222
$table->integer('time_elapsed')->nullable()->index();
2323
$table->boolean('failed')->default(false)->index();
2424
$table->integer('attempt')->default(0);

src/Models/QueueMonitor.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,10 @@
1010

1111
class QueueMonitor extends Model
1212
{
13+
// Needed to support microtime.
14+
15+
protected $dateFormat = 'Y-m-d H:i:s.u';
16+
1317
protected $table = 'queue_monitor';
1418

1519
/**

0 commit comments

Comments
 (0)