add_events.sh 188 B

12345678
  1. #!/bin/bash
  2. declare -a arr=("registration" "login" "logout" "view")
  3. while true; do
  4. echo "xadd mystream \"*\" event_type ${arr[$(($RANDOM % 4))]} user chris" | redis-cli
  5. sleep 0.1
  6. done