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 f851c37 commit abb3da3
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 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 = FrozenTime::now('UTC');
$queueMonitoringLog->message_id = (string)$queueMessage->getMessageId();
$queueMonitoringLog->message_timestamp = FrozenTime::createFromTimestamp(
(int)$queueMessage->getTimestamp(),
Expand Down
4 changes: 1 addition & 3 deletions src/Model/Table/LogsTable.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,7 @@
* @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 @@ -48,7 +47,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 abb3da3

Please sign in to comment.