13 lines
367 B
Python
13 lines
367 B
Python
from engine.constants import BATCH_SIZE
|
|
|
|
def get_new_lectures(cur, last_processed: int):
|
|
sql = """
|
|
SELECT rcourse_id, chrinfo_tag, chrinfo_time, chrinfo_location
|
|
FROM reader_lectures
|
|
WHERE rcourse_id > %s
|
|
ORDER BY rcourse_id ASC
|
|
LIMIT %s
|
|
"""
|
|
cur.execute(sql, (last_processed, BATCH_SIZE))
|
|
return cur.fetchall()
|