make sure to raise exception if redis is not there (#674)

### What problem does this PR solve?

### Type of change

- [x] Refactoring
This commit is contained in:
KevinHuSh
2024-05-08 15:20:45 +08:00
committed by GitHub
parent c28f7b5d38
commit 7ddb2f19be
2 changed files with 11 additions and 1 deletions

View File

@ -159,4 +159,4 @@ def queue_tasks(doc, bucket, name):
DocumentService.begin2parse(doc["id"])
for t in tsks:
REDIS_CONN.queue_product(SVR_QUEUE_NAME, message=t)
assert REDIS_CONN.queue_product(SVR_QUEUE_NAME, message=t), "Can't access Redis. Please check the Redis' status."