added push to db logic with redis checking for clientids