diff options
author | Remi Collet <remi@remirepo.net> | 2024-04-26 09:24:37 +0200 |
---|---|---|
committer | Remi Collet <remi@php.net> | 2024-04-26 09:24:37 +0200 |
commit | eb7e370cb03a68bfb9cc229088dc5b8c78a47040 (patch) | |
tree | b020a1b138c248abc0220428b0996b047f0170f2 /mockit | |
parent | fe4a06d6bd6cea9899295c550076894b19c3f09b (diff) |
fix redis server address
Diffstat (limited to 'mockit')
-rwxr-xr-x | mockit | 27 |
1 files changed, 15 insertions, 12 deletions
@@ -13,8 +13,19 @@ BUILD_BASE=1 BUILD_SCLS=1 REDIS=0 +# ARCH detection and check +if [ "$(uname -m)" = "x86_64" ]; then + SUF=x + QUEUE=mockx + REDISCLI="redis-cli" +else + SUF=a + QUEUE=mocka + REDISCLI="redis-cli -h remi" +fi + if [ "$1" == "--redis" ]; then - CHECK=$(redis-cli ping) + CHECK=$($REDISCLI ping) [ "$CHECK" = "PONG" ] || exit 1 REDIS=1 shift @@ -46,14 +57,6 @@ else shift fi -# ARCH detection and check -if [ "$(uname -m)" = "x86_64" ]; then - SUF=x - QUEUE=mockx -else - SUF=a - QUEUE=mocka -fi case $DIST in *x) if [ $SUF != x ]; then @@ -127,7 +130,7 @@ do if [ 0$i -ge $MIN -a 0$i -le $MAX ]; then CMD="mock -q --configdir=$mocketc -r ${DIST}${i} rebuild $SRPM $@" if [ $REDIS -ge 1 ]; then - redis-cli sadd $QUEUE "$CMD" + $REDISCLI sadd $QUEUE "$CMD" else echo -n "$(date +%X) $i " $CMD --uniqueext=$ID && echo " Ok." || echo " Error !" @@ -140,7 +143,7 @@ do if [ 0$i -ge $MIN -a 0$i -le $MAX ]; then CMD="mock -q --configdir=$mocketc -r ${DIST}scl${i} rebuild $SRPM $@" if [ $REDIS -ge 1 ]; then - redis-cli sadd $QUEUE "$CMD" + $REDISCLI sadd $QUEUE "$CMD" else echo -n "$(date +%X) scl$i " $CMD --uniqueext=$ID && echo " Ok." || echo " Error !" @@ -149,7 +152,7 @@ do done if [ $REDIS -ge 1 ]; then - echo "Queue size: " $(redis-cli scard $QUEUE) + echo "Queue size: " $($REDISCLI scard $QUEUE) else date +%X fi |