Switch to SSDB for message queueing
This commit is contained in:
@@ -36,7 +36,10 @@ class Ingest(object):
|
||||
items = []
|
||||
# for source in SOURCES:
|
||||
# key = f"{KEYPREFIX}{source}"
|
||||
chunk = await db.ar.zpop(KEYNAME, CHUNK_SIZE)
|
||||
length = await db.ar.llen(KEYNAME)
|
||||
start_num = length - CHUNK_SIZE
|
||||
chunk = await db.ar.lrange(KEYNAME, start_num, -1)
|
||||
# chunk = await db.ar.rpop(KEYNAME, CHUNK_SIZE)
|
||||
if not chunk:
|
||||
return
|
||||
for item in chunk:
|
||||
|
||||
Reference in New Issue
Block a user