Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Korko
SecretSanta.fr
Commits
7d219bc4
Commit
7d219bc4
authored
Jan 04, 2017
by
Korko
Browse files
Change statsd data type (gauge => counter)
parent
c50d390c
Changes
1
Hide whitespace changes
Inline
Side-by-side
app/Http/Controllers/RandomFormController.php
View file @
7d219bc4
...
...
@@ -46,8 +46,8 @@ class RandomFormController extends Controller
];
}
Statsd
::
gauge
(
'draws'
,
'+1'
);
Statsd
::
gauge
(
'participants'
,
'+'
.
count
(
$participants
));
Statsd
::
increment
(
'draws'
);
Statsd
::
increment
(
'participants'
,
count
(
$participants
));
return
$participants
;
}
...
...
@@ -65,12 +65,12 @@ class RandomFormController extends Controller
protected
function
sendMessage
(
Request
$request
,
array
$santa
,
array
$target
)
{
if
(
!
empty
(
$santa
[
'email'
]))
{
Statsd
::
gauge
(
'email'
,
'+1'
);
Statsd
::
increment
(
'email'
);
$this
->
sendMail
(
$santa
,
$target
,
$request
->
input
(
'title'
),
$request
->
input
(
'contentMail'
));
}
if
(
!
empty
(
$santa
[
'phone'
]))
{
Statsd
::
gauge
(
'phone'
,
'+1'
);
Statsd
::
increment
(
'phone'
);
$this
->
sendSms
(
$santa
,
$target
,
$request
->
input
(
'contentSMS'
));
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment