Logging updated view counts.

This commit is contained in:
Roland 2021-11-11 15:28:18 -07:00
parent 63337e6a9a
commit 2585149efe
No known key found for this signature in database
GPG key ID: 9D6DBD3ACF11AB93

View file

@ -509,8 +509,11 @@ def update_view_count(channel_id: int):
SET view_count = s.view_count
FROM source as s
WHERE source_id=s.id AND channel_id=%s
RETURNING video.id AS updated_ids
'''
curs.execute(stmt, (view_counts_str, channel_id))
count = len(curs.fetchall())
logger.debug(f'Updated {count} view counts in DB.')
minimize_channel = partial(minimize_dict, keys=MINIMUM_CHANNEL_KEYS)