Commit dfd666a2 authored by Zhang Xiaoli's avatar Zhang Xiaoli
Browse files

redis_server: Simulates DFS sending Redis messages

parent 669e4536
#!/bin/bash
REDIS_SERVER="localhost"
while true
do
obsid=$(redis-cli -h ${REDIS_SERVER} -a 123456 rpop single-image-reduction:obsid)
echo "obsid : "$obsid
if [ -z "$obsid" ]; then
echo "obsid is empty"
sleep 10s
fi
if [ -n "$obsid" ]; then
echo "obsid is not empty"
send-message $obsid
sleep 10ms
fi
#exit $?
done
# 模拟DFS发送redis消息
```bash
for line in {10160000000..10160000001}; do
echo $line;
redis-cli -h 192.169.23.2 -a 123456 lpush single-image-reduction:obsid $line;
done
```
redis-cli -h 127.0.0.1 -a 123456 lpush single-image-reduction:obsid 10160000000;
redis-cli -h 127.0.0.1 -a 123456 lpush single-image-reduction:obsid 30100000003;
redis-cli -h 127.0.0.1 -a 123456 lpush single-image-reduction:obsid 41000000101;
redis-cli -h 127.0.0.1 -a 123456 lpush single-image-reduction:obsid 50100000001;
\ No newline at end of file
version: '3.8'
services:
redis:
image: redis:5
container_name: redis
command: redis-server --requirepass 123456
ports:
- "6379:6379"
volumes:
- ${PWD}/DATA/redis-data:/data
\ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment