mirror of
git://xwords.git.sourceforge.net/gitroot/xwords/xwords
synced 2025-01-27 07:58:49 +01:00
Merge branch 'android_branch' of ssh://xwords.git.sourceforge.net/gitroot/xwords/xwords into android_branch
This commit is contained in:
commit
ddaa368af3
2 changed files with 32 additions and 2 deletions
|
@ -153,7 +153,7 @@ kill_from_logs() {
|
|||
done
|
||||
if [ -n "$CMDS" ]; then
|
||||
echo "../relay/rq $CMDS"
|
||||
../relay/rq $CMDS 2>/dev/null || true
|
||||
../relay/rq -a $HOST $CMDS 2>/dev/null || true
|
||||
fi
|
||||
}
|
||||
|
||||
|
@ -161,7 +161,7 @@ kill_from_log() {
|
|||
LOG=$1
|
||||
RELAYID=$(./scripts/relayID.sh $LOG)
|
||||
if [ -n "$RELAYID" ]; then
|
||||
../relay/rq -d $RELAYID 2>/dev/null || true
|
||||
../relay/rq -a $HOST -d $RELAYID 2>/dev/null || true
|
||||
return 0 # success
|
||||
fi
|
||||
return 1
|
||||
|
|
30
xwords4/relay/scripts/showinplay.sh
Executable file
30
xwords4/relay/scripts/showinplay.sh
Executable file
|
@ -0,0 +1,30 @@
|
|||
#!/bin/sh
|
||||
|
||||
set -e -u
|
||||
|
||||
LIMIT=10000
|
||||
|
||||
usage() {
|
||||
echo "usage: $0 [--limit <n>]"
|
||||
}
|
||||
|
||||
while [ $# -gt 0 ]; do
|
||||
case $1 in
|
||||
--limit)
|
||||
LIMIT=$2
|
||||
shift
|
||||
;;
|
||||
*) usage
|
||||
;;
|
||||
esac
|
||||
shift
|
||||
done
|
||||
|
||||
QUERY="WHERE NOT -NTOTAL = sum_array(nperdevice)"
|
||||
|
||||
echo "Row count:" $(psql -t xwgames -c "select count(*) FROM games $QUERY;")
|
||||
|
||||
echo "SELECT dead,connname,cid,room,lang,ntotal,nperdevice,nsent,ctime,mtimes "\
|
||||
"FROM games $QUERY ORDER BY NOT dead, connname LIMIT $LIMIT;" \
|
||||
| psql xwgames
|
||||
|
Loading…
Add table
Reference in a new issue