Archived
1
0

Add action flush to stats

This commit is contained in:
Mercier Pierre-Olivier 2013-12-05 07:19:20 +01:00
parent 4482f47eec
commit eb8c74d465
3 changed files with 20 additions and 1 deletions

View File

@ -41,3 +41,5 @@ cat <<EOF | gearman -h gearmand-srv -p 4730 -f moulette_get
<param name="rendu">$RENDU</param>
$LOGINS</process>
EOF
echo

View File

@ -19,3 +19,5 @@ cat <<EOF | gearman -h gearmand-srv -p 4730 -f moulette_get
<param name="to">$1</param>
</process>
EOF
echo

View File

@ -6,9 +6,24 @@ then
exit 1
fi
ACTION=
if [ -n "$1" ]
then
if [ "$1" = "flush" ]
then
ACTION=" <param name=\"action\">flush</param>
"
else
echo "Unknown action '$1'"
exit 1
fi
fi
cat <<EOF | gearman -h gearmand-srv -p 4730 -f moulette_get
<?xml version="1.0" encoding="UTF-8"?>
<process>
<param name="type">stats</param>
</process>
$ACTION</process>
EOF
echo