diff --git a/src/Listener/QueueMonitorListener.php b/src/Listener/QueueMonitorListener.php index a1ab5d8..2c02de2 100644 --- a/src/Listener/QueueMonitorListener.php +++ b/src/Listener/QueueMonitorListener.php @@ -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(), diff --git a/src/Model/Table/LogsTable.php b/src/Model/Table/LogsTable.php index 22f80a8..e99bde2 100644 --- a/src/Model/Table/LogsTable.php +++ b/src/Model/Table/LogsTable.php @@ -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 { /** @@ -48,7 +47,6 @@ public function initialize(array $config): void $this->setTable('queue_monitoring_logs'); $this->setDisplayField('event'); $this->setPrimaryKey('id'); - $this->addBehavior('Timestamp'); } /**