Archived
1
0

Add new moulette command: set_workers

This commit is contained in:
Mercier Pierre-Olivier 2013-12-05 06:44:43 +01:00
parent 3c60afe6e9
commit 4d003d6626

View File

@ -0,0 +1,21 @@
#!/bin/sh
if [ -z "$1" ]
then
echo "Usage: $0 <nb_worker>"
exit 1
fi
if ! which gearman > /dev/null 2> /dev/null
then
echo "gearman isn't installed on this machine. Please try another one."
exit 1
fi
cat <<EOF | gearman -h gearmand-srv -p 4730 -f moulette_get
<?xml version="1.0" encoding="UTF-8"?>
<process>
<param name="type">set_workers</param>
<param name="nb">$1</param>
</process>
EOF