Skip to content

Commit

Permalink
Add commands to force queue sending
Browse files Browse the repository at this point in the history
  • Loading branch information
turbo124 committed May 8, 2020
1 parent 0ecdfb0 commit 232a59b
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/Commands/ForceSend.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ class ForceSend extends Command

public function handle()
{
$this->logMessage(date('Y-m-d h:i:s') . ' Sending Data');
$this->logMessage('Sending Data');

$metric_types = ['counter', 'gauge', 'multi_metric', 'mixed_metric'];

Expand All @@ -45,4 +45,11 @@ public function handle()

$this->logMessage("I have " . count($metrics) . "pending to be sent");
}

private function logMessage($str)
{
$str = date('Y-m-d h:i:s') . ' ' . $str;
$this->info($str);
$this->log .= $str . "\n";
}
}

0 comments on commit 232a59b

Please sign in to comment.