
import json
import time

import redis

# from scripts.core.handler.task3 import num

r = redis.Redis(
    host='192.168.0.220',
    port=6379,
    db=111)
num = 1
while True:
    data = {
        "data": {"patient_id": num}
    }
    num = num + 1
    r.set("num", json.dumps(data))
    print(r.get("num"))
    time.sleep(5)
