backfiller: Don't consider 404s for chat batches to be an error

pull/318/head
Mike Lang 2 years ago
parent ad4827237f
commit 78ee38a4b9

@ -151,6 +151,12 @@ def get_remote_segment(base_dir, node, channel, quality, hour, missing_segment,
uri = '{}/segments/{}/{}/{}/{}'.format(node, channel, quality, hour, missing_segment) uri = '{}/segments/{}/{}/{}/{}'.format(node, channel, quality, hour, missing_segment)
resp = requests.get(uri, stream=True, timeout=timeout, metric_name='get_remote_segment') resp = requests.get(uri, stream=True, timeout=timeout, metric_name='get_remote_segment')
# When backfilling chat batches, it's common for the batch to have been replaced
# by the time we try to pull it, as it has been merged into another batch.
# We don't consider this an error.
if resp.status_code == 404 and quality == 'chat':
logger.info("Ignoring missing chat batch at url: {}".format(uri))
return
resp.raise_for_status() resp.raise_for_status()
with open(temp_path, 'wb') as f: with open(temp_path, 'wb') as f:

Loading…
Cancel
Save