Passing $appId on createRecord()

This commit is contained in:
Alex Renoki 2020-08-30 21:23:06 +03:00
parent c6c3877cf7
commit f1a14fbd1d
2 changed files with 6 additions and 4 deletions

View File

@ -103,7 +103,7 @@ class MemoryStatisticsLogger implements StatisticsLogger
continue; continue;
} }
$this->createRecord($statistic); $this->createRecord($statistic, $appId);
$currentConnectionCount = $this->channelManager->getConnectionCount($appId); $currentConnectionCount = $this->channelManager->getConnectionCount($appId);
@ -140,9 +140,10 @@ class MemoryStatisticsLogger implements StatisticsLogger
* Create a new record using the Statistic Driver. * Create a new record using the Statistic Driver.
* *
* @param Statistic $statistic * @param Statistic $statistic
* @param mixed $appId
* @return void * @return void
*/ */
public function createRecord(Statistic $statistic) public function createRecord(Statistic $statistic, $appId)
{ {
$this->driver::create($statistic->toArray()); $this->driver::create($statistic->toArray());
} }

View File

@ -122,7 +122,7 @@ class RedisStatisticsLogger implements StatisticsLogger
continue; continue;
} }
$this->createRecord($statistic); $this->createRecord($statistic, $appId);
$currentConnectionCount = $this->channelManager->getConnectionCount($appId); $currentConnectionCount = $this->channelManager->getConnectionCount($appId);
@ -203,9 +203,10 @@ class RedisStatisticsLogger implements StatisticsLogger
* Create a new record using the Statistic Driver. * Create a new record using the Statistic Driver.
* *
* @param array $statistic * @param array $statistic
* @param mixed $appId
* @return void * @return void
*/ */
protected function createRecord(array $statistic): void protected function createRecord(array $statistic, $appId): void
{ {
$this->driver::create([ $this->driver::create([
'app_id' => $appId, 'app_id' => $appId,