Skip to content

Commit

Permalink
removed TimestampBehavior
Browse files Browse the repository at this point in the history
  • Loading branch information
arusinowski committed May 14, 2024
1 parent c79a035 commit 29a1dcc
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 2 deletions.
1 change: 1 addition & 0 deletions src/Listener/QueueMonitorListener.php
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,7 @@ private function storeEvent(
/** @var \CakeDC\QueueMonitor\Model\Entity\Log $queueMonitoringLog */
$queueMonitoringLog = $this->QueueMonitoringLogs->newEmptyEntity();

$queueMonitoringLog->created = DateTime::now('UTC');
$queueMonitoringLog->message_id = (string)$queueMessage->getMessageId();
$queueMonitoringLog->message_timestamp = DateTime::createFromTimestamp(
(int)$queueMessage->getTimestamp(),
Expand Down
2 changes: 0 additions & 2 deletions src/Model/Table/LogsTable.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@
* @method \CakeDC\QueueMonitor\Model\Entity\Log[] patchEntities(iterable $entities, array $data, array $options = [])
* @method \CakeDC\QueueMonitor\Model\Entity\Log|false save(\Cake\Datasource\EntityInterface $entity, $options = [])
* @method \CakeDC\QueueMonitor\Model\Entity\Log saveOrFail(\Cake\Datasource\EntityInterface $entity, $options = [])
* @mixin \Cake\ORM\Behavior\TimestampBehavior
*/
class LogsTable extends Table
{
Expand All @@ -46,7 +45,6 @@ public function initialize(array $config): void
$this->setTable('queue_monitoring_logs');
$this->setDisplayField('event');
$this->setPrimaryKey('id');
$this->addBehavior('Timestamp');
}

/**
Expand Down

0 comments on commit 29a1dcc

Please sign in to comment.