Merge branch 'master' of github.com:beyondcode/laravel-websockets
This commit is contained in:
commit
d0ad7e6530
|
|
@ -57,7 +57,9 @@ class Logger
|
|||
public function save()
|
||||
{
|
||||
foreach ($this->statistics as $appId => $statistic) {
|
||||
// TODO: perform http request
|
||||
if ($statistic->isEnabled()) {
|
||||
// TODO: perform http request
|
||||
}
|
||||
|
||||
// Reset connection and message count
|
||||
$connections = Collection::make($this->channelManager->getChannels($appId))->sum(function ($channel) {
|
||||
|
|
|
|||
|
|
@ -2,6 +2,8 @@
|
|||
|
||||
namespace BeyondCode\LaravelWebSockets\Statistics\Logging;
|
||||
|
||||
use BeyondCode\LaravelWebSockets\Apps\App;
|
||||
|
||||
class Statistic
|
||||
{
|
||||
/** @var int|string */
|
||||
|
|
@ -24,6 +26,11 @@ class Statistic
|
|||
$this->appId = $appId;
|
||||
}
|
||||
|
||||
public function isEnabled(): bool
|
||||
{
|
||||
return App::findById($this->appId)->statisticsEnabled;
|
||||
}
|
||||
|
||||
public function connection()
|
||||
{
|
||||
$this->connections++;
|
||||
|
|
|
|||
Loading…
Reference in New Issue