diff --git a/src/Listener/QueueMonitorListener.php b/src/Listener/QueueMonitorListener.php index 967546e..94aa17e 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 = DateTime::now('UTC'); $queueMonitoringLog->message_id = (string)$queueMessage->getMessageId(); $queueMonitoringLog->message_timestamp = DateTime::createFromTimestamp( (int)$queueMessage->getTimestamp(), diff --git a/src/Model/Table/LogsTable.php b/src/Model/Table/LogsTable.php index 74d409c..663f638 100644 --- a/src/Model/Table/LogsTable.php +++ b/src/Model/Table/LogsTable.php @@ -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 { @@ -46,7 +45,6 @@ public function initialize(array $config): void $this->setTable('queue_monitoring_logs'); $this->setDisplayField('event'); $this->setPrimaryKey('id'); - $this->addBehavior('Timestamp'); } /**