[Streams] Check non-existent streams more than once #5223

Merged
Injabie3 merged 4 commits from streams-http404-upstream into V3/develop 2021-09-03 16:25:02 +02:00
Injabie3 commented 2021-08-23 09:24:55 +02:00 (Migrated from github.com)

Description of the changes

Background:
For YouTube streams, it seems like the YouTube RSS feed sometimes returns a HTTP 404 for a channel, even though the channel exists. This causes #5195.

This PR attempts to fix #5195 by doing the following:

  • Declare a new attribute retry_count in the Stream base class.
  • Increment retry_count every time we fail to find the stream. In the case of YouTube, this happens when we get an HTTP 404 response from the RSS feed.
  • Reset the retry_count to zero when we successfully fetch data.
  • If we fail to reach it after MAX_RETRY_COUNT retries, then we declare the stream as non-existent, and purge it from the list of streams we check.

Testing:

  • Please see comments below
  • Check interval is ~3 minutes.
### Description of the changes **Background**: For YouTube streams, it seems like the YouTube RSS feed sometimes returns a HTTP 404 for a channel, even though the channel exists. This causes #5195. This PR attempts to fix #5195 by doing the following: - Declare a new attribute `retry_count` in the `Stream` base class. - Increment `retry_count` every time we fail to find the stream. In the case of YouTube, this happens when we get an HTTP 404 response from the RSS feed. - Reset the `retry_count` to zero when we successfully fetch data. - If we fail to reach it after `MAX_RETRY_COUNT` retries, then we declare the stream as non-existent, and purge it from the list of streams we check. **Testing**: - Please see comments below - Check interval is ~3 minutes.
palmtree5 (Migrated from github.com) reviewed 2021-08-23 09:24:55 +02:00
Injabie3 commented 2021-08-24 09:18:07 +02:00 (Migrated from github.com)

Saw a few instances of catching this behaviour below:

[2021-08-23 23:40:36] [DEBUG] red.core.cogs.Streams: livestreams for HAACHAMA Ch 赤井はあと: []
[2021-08-23 23:40:36] [DEBUG] red.core.cogs.Streams: not_livestreams for HAACHAMA Ch 赤井はあと: ['mdFl1sTBn_w', 'P6DcLalmvkI', 'IjbOzggZYE4', 'y1DwPRiq4oo', '9XMs-OcTnQw', 'ATDnxsdCzqU', '2OQDO7GMep4', 'uc4Qw6fKvEI', 'I5sCLXy8sjw', 'mhB4915XKJo', 'vGi6U_mS4g8', 'ilejfByx_0U', 'q5wfoXWuVfw', '-Jl9PAdb9HM', 'cX7HlTvJ-T4']
[2021-08-23 23:40:36] [INFO] red.core.cogs.Streams: Stream with name Sachi Saiki 才気桜千 Channel seems to not exist, will retry later
<truncated>
[2021-08-23 23:40:36] [DEBUG] red.core.cogs.Streams: livestreams for Mori Calliope Ch. hololive-EN: []
[2021-08-23 23:40:36] [DEBUG] red.core.cogs.Streams: not_livestreams for Mori Calliope Ch. hololive-EN: ['EawC9vslIw8', 'MIcFDAxQh0g', 'hPRoh9XPxn4', '9OtR59JTcMU', 'pjSojAEp48M', 'eAr-NGty9vI', '75d6uskxTpY', 'RUZZd0q1cGQ', 't691HA_OHnE',
'1dlWRiPeeic', 'QPK2gk2WNrw', 'A2kVbF3m8HI', '_nX02E3i4rk', 'ZshHgTtCJag', 'xd5p2MH1tiQ']
[2021-08-23 23:40:36] [INFO] red.core.cogs.Streams: Stream with name Ninomae Ina'nis Ch. hololive-EN seems to not exist, will retry later
<truncated>
[2021-08-23 23:43:39] [DEBUG] red.core.cogs.Streams: livestreams for Sachi Saiki 才気桜千 Channel: []
[2021-08-23 23:43:39] [DEBUG] red.core.cogs.Streams: not_livestreams for Sachi Saiki 才気桜千 Channel: ['T5YywwIqalA', 'kAXCkJ8sxwQ', 'TiWz7Z7koc8', 'LiYZn6vSLFo', 'MvfMvdlJF94', 'Uqmi8EbOOnU', '9YvPruFdXYI', 'QUoaBsxyq_M', 'crKz_wAW00I', 'jpeE-tGz_xU', 'A2QGP7rhHaU', 'yQ3lRlQm_A0', '-8fcR-G393U', '5QZa0nEyGQU', 'AOkraXEU1po', 'PaX_AURtDRo']      
<truncated>
[2021-08-23 23:43:39] [DEBUG] red.core.cogs.Streams: livestreams for Ninomae Ina'nis Ch. hololive-EN: []
[2021-08-23 23:43:39] [DEBUG] red.core.cogs.Streams: not_livestreams for Ninomae Ina'nis Ch. hololive-EN: ['yoYaAVixPg8', '60AzXNCJIgk', '5eDBKUq2bz4', '1fOMSWjxsAw', 'wFZjaN0bssI', 'nqa9EqZR3XY', 'S630gqcJ0CQ', 'qPPTKLi9uw8', 'F83AOHeRtIA', 'Ua6udlJdsKE', '8ZdLXELdF9Q', 'tKKBjQc6KWI', 'o9BR2Wxuwf0', 'nj1GHW0ytq4', '5uDMkQ38b3k']

<truncated>

[2021-08-23 23:58:54] [DEBUG] red.core.cogs.Streams: livestreams for Gawr Gura Ch. hololive-EN: []
[2021-08-23 23:58:54] [DEBUG] red.core.cogs.Streams: not_livestreams for Gawr Gura Ch. hololive-EN: ['34qwR8XmkiI', 'TApuosFkpHU', 'aAPSCyFo6Ks', 'S_wquDzkCvw', 'mOD8S1A93FU', 'cW2Gu6Wmg8o', 'VhM4FoxqdZ8', '_7b01SjiiBE', 'IFK-GNj8Fts', 'e-WXpylijus', 'YhmEqefSZZc', 'zuIDDWQlUWg', 'Ds71TFQCr5c', 'jPJSTCAgyjE', 'nKHypEjnRXE', 'JGyaMXShc4g']
[2021-08-23 23:58:54] [INFO] red.core.cogs.Streams: Stream with name Watson Amelia Ch. hololive-EN seems to not exist, will retry later
<truncated>
[2021-08-24 00:01:58] [DEBUG] red.core.cogs.Streams: livestreams for Watson Amelia Ch. hololive-EN: []
[2021-08-24 00:01:58] [DEBUG] red.core.cogs.Streams: not_livestreams for Watson Amelia Ch. hololive-EN: ['0iSKEkdDAKA', 'GpVDj43ioMo', 'wSmNK842gs8', 'Nn9AGOrDNDQ', 'cSHMqA9zfkA', 'lvJz679M6aE', 'yH_2jN0aY2w', 'UhG_BItojWg', '5NEUn1zgMME',
'ztM7Q-Qm-CQ', 'E4fol47EM50', '0AI7J0uxKv0', '2k61CPt_1Zo', 'dMnCBL40Bfg', 'NoiHcK4pkps']
Saw a few instances of catching this behaviour below: ``` [2021-08-23 23:40:36] [DEBUG] red.core.cogs.Streams: livestreams for HAACHAMA Ch 赤井はあと: [] [2021-08-23 23:40:36] [DEBUG] red.core.cogs.Streams: not_livestreams for HAACHAMA Ch 赤井はあと: ['mdFl1sTBn_w', 'P6DcLalmvkI', 'IjbOzggZYE4', 'y1DwPRiq4oo', '9XMs-OcTnQw', 'ATDnxsdCzqU', '2OQDO7GMep4', 'uc4Qw6fKvEI', 'I5sCLXy8sjw', 'mhB4915XKJo', 'vGi6U_mS4g8', 'ilejfByx_0U', 'q5wfoXWuVfw', '-Jl9PAdb9HM', 'cX7HlTvJ-T4'] [2021-08-23 23:40:36] [INFO] red.core.cogs.Streams: Stream with name Sachi Saiki 才気桜千 Channel seems to not exist, will retry later <truncated> [2021-08-23 23:40:36] [DEBUG] red.core.cogs.Streams: livestreams for Mori Calliope Ch. hololive-EN: [] [2021-08-23 23:40:36] [DEBUG] red.core.cogs.Streams: not_livestreams for Mori Calliope Ch. hololive-EN: ['EawC9vslIw8', 'MIcFDAxQh0g', 'hPRoh9XPxn4', '9OtR59JTcMU', 'pjSojAEp48M', 'eAr-NGty9vI', '75d6uskxTpY', 'RUZZd0q1cGQ', 't691HA_OHnE', '1dlWRiPeeic', 'QPK2gk2WNrw', 'A2kVbF3m8HI', '_nX02E3i4rk', 'ZshHgTtCJag', 'xd5p2MH1tiQ'] [2021-08-23 23:40:36] [INFO] red.core.cogs.Streams: Stream with name Ninomae Ina'nis Ch. hololive-EN seems to not exist, will retry later <truncated> [2021-08-23 23:43:39] [DEBUG] red.core.cogs.Streams: livestreams for Sachi Saiki 才気桜千 Channel: [] [2021-08-23 23:43:39] [DEBUG] red.core.cogs.Streams: not_livestreams for Sachi Saiki 才気桜千 Channel: ['T5YywwIqalA', 'kAXCkJ8sxwQ', 'TiWz7Z7koc8', 'LiYZn6vSLFo', 'MvfMvdlJF94', 'Uqmi8EbOOnU', '9YvPruFdXYI', 'QUoaBsxyq_M', 'crKz_wAW00I', 'jpeE-tGz_xU', 'A2QGP7rhHaU', 'yQ3lRlQm_A0', '-8fcR-G393U', '5QZa0nEyGQU', 'AOkraXEU1po', 'PaX_AURtDRo'] <truncated> [2021-08-23 23:43:39] [DEBUG] red.core.cogs.Streams: livestreams for Ninomae Ina'nis Ch. hololive-EN: [] [2021-08-23 23:43:39] [DEBUG] red.core.cogs.Streams: not_livestreams for Ninomae Ina'nis Ch. hololive-EN: ['yoYaAVixPg8', '60AzXNCJIgk', '5eDBKUq2bz4', '1fOMSWjxsAw', 'wFZjaN0bssI', 'nqa9EqZR3XY', 'S630gqcJ0CQ', 'qPPTKLi9uw8', 'F83AOHeRtIA', 'Ua6udlJdsKE', '8ZdLXELdF9Q', 'tKKBjQc6KWI', 'o9BR2Wxuwf0', 'nj1GHW0ytq4', '5uDMkQ38b3k'] <truncated> [2021-08-23 23:58:54] [DEBUG] red.core.cogs.Streams: livestreams for Gawr Gura Ch. hololive-EN: [] [2021-08-23 23:58:54] [DEBUG] red.core.cogs.Streams: not_livestreams for Gawr Gura Ch. hololive-EN: ['34qwR8XmkiI', 'TApuosFkpHU', 'aAPSCyFo6Ks', 'S_wquDzkCvw', 'mOD8S1A93FU', 'cW2Gu6Wmg8o', 'VhM4FoxqdZ8', '_7b01SjiiBE', 'IFK-GNj8Fts', 'e-WXpylijus', 'YhmEqefSZZc', 'zuIDDWQlUWg', 'Ds71TFQCr5c', 'jPJSTCAgyjE', 'nKHypEjnRXE', 'JGyaMXShc4g'] [2021-08-23 23:58:54] [INFO] red.core.cogs.Streams: Stream with name Watson Amelia Ch. hololive-EN seems to not exist, will retry later <truncated> [2021-08-24 00:01:58] [DEBUG] red.core.cogs.Streams: livestreams for Watson Amelia Ch. hololive-EN: [] [2021-08-24 00:01:58] [DEBUG] red.core.cogs.Streams: not_livestreams for Watson Amelia Ch. hololive-EN: ['0iSKEkdDAKA', 'GpVDj43ioMo', 'wSmNK842gs8', 'Nn9AGOrDNDQ', 'cSHMqA9zfkA', 'lvJz679M6aE', 'yH_2jN0aY2w', 'UhG_BItojWg', '5NEUn1zgMME', 'ztM7Q-Qm-CQ', 'E4fol47EM50', '0AI7J0uxKv0', '2k61CPt_1Zo', 'dMnCBL40Bfg', 'NoiHcK4pkps'] ```
Injabie3 commented 2021-08-25 09:39:53 +02:00 (Migrated from github.com)

Seeing more of this being caught:

[2021-08-24 23:51:54] [DEBUG] red.core.cogs.Streams: livestreams for Gawr Gura Ch. hololive-EN: []                                                                                                                   [2021-08-24 23:51:54] [DEBUG] red.core.cogs.Streams: not_livestreams for Gawr Gura Ch. hololive-EN: ['34qwR8XmkiI', 'TApuosFkpHU', 'aAPSCyFo6Ks', 'S_wquDzkCvw', 'mOD8S1A93FU', 'cW2Gu6Wmg8o', 'VhM4FoxqdZ8', '_7b01SjiiBE', 'IFK-GNj8Fts', 'e-WXpylijus', 'YhmEqefSZZc', 'zuIDDWQlUWg', 'Ds71TFQCr5c', 'jPJSTCAgyjE', 'nKHypEjnRXE', 'JGyaMXShc4g', 'zNadRmlBn4k']
[2021-08-24 23:51:54] [DEBUG] red.core.cogs.Streams: video_id not in not_livestreams: 5efPwIA_PQQ
[2021-08-24 23:51:54] [DEBUG] red.core.cogs.Streams: stream_data for 5efPwIA_PQQ: {'actualStartTime': '2021-08-25T05:05:37Z', 'scheduledStartTime': '2021-08-25T05:05:00Z', 'concurrentViewers': '5718', 'activeLiveChatId': 'Cg0KCzVlZlB3SUFfUFFRKicKGFVDeWwxejNqbzNYSFIxcmlMRktHNVVBZxILNWVmUHdJQV9QUVE'}
<truncated>
[2021-08-24 23:51:54] [DEBUG] red.core.cogs.Streams: livestreams for Watson Amelia Ch. hololive-EN: ['5efPwIA_PQQ']
[2021-08-24 23:51:54] [DEBUG] red.core.cogs.Streams: not_livestreams for Watson Amelia Ch. hololive-EN: ['0iSKEkdDAKA', 'GpVDj43ioMo', 'wSmNK842gs8', 'Nn9AGOrDNDQ', 'cSHMqA9zfkA', 'lvJz679M6aE', 'yH_2jN0aY2w', 'UhG_BItojWg', '5NEUn1zgMME', 'ztM7Q-Qm-CQ', 'E4fol47EM50', '0AI7J0uxKv0', '2k61CPt_1Zo', 'dMnCBL40Bfg', 'NoiHcK4pkps']
<truncated>
[2021-08-24 23:51:55] [DEBUG] red.core.cogs.Streams: livestreams for HAACHAMA Ch 赤井はあと: []                                                                                                                      [2021-08-24 23:51:55] [DEBUG] red.core.cogs.Streams: not_livestreams for HAACHAMA Ch 赤井はあと: ['mdFl1sTBn_w', 'P6DcLalmvkI', 'IjbOzggZYE4', 'y1DwPRiq4oo', '9XMs-OcTnQw', 'ATDnxsdCzqU', '2OQDO7GMep4', 'uc4Qw6fKvEI', 'I5sCLXy8sjw', 'mhB4915XKJo', 'vGi6U_mS4g8', 'ilejfByx_0U', 'q5wfoXWuVfw', '-Jl9PAdb9HM', 'cX7HlTvJ-T4', 'UpVise2FH2E']
[2021-08-24 23:51:55] [INFO] red.core.cogs.Streams: Stream with name Sachi Saiki 才気桜千 Channel seems to not exist, will retry later
[2021-08-24 23:51:55] [DEBUG] red.core.cogs.Streams: video_id not in not_livestreams: PluDFsVo3z0                                                                                                                    [2021-08-24 23:51:55] [DEBUG] red.core.cogs.Streams: stream_data for PluDFsVo3z0: {'scheduledStartTime': '2021-08-26T14:00:00Z', 'activeLiveChatId': 'Cg0KC1BsdURGc1ZvM3owKicKGFVDTF9xaGd0T3kwZHkxQWdwOHZreVNRZxILUGx1REZzVm8zejA'}

<truncated until next poll>

[2021-08-24 23:54:58] [INFO] red.core.cogs.Streams: Stream with name Gawr Gura Ch. hololive-EN seems to not exist, will retry later
<truncated>
[2021-08-24 23:54:58] [DEBUG] red.core.cogs.Streams: livestreams for Watson Amelia Ch. hololive-EN: ['5efPwIA_PQQ']
[2021-08-24 23:54:58] [DEBUG] red.core.cogs.Streams: not_livestreams for Watson Amelia Ch. hololive-EN: ['0iSKEkdDAKA', 'GpVDj43ioMo', 'wSmNK842gs8', 'Nn9AGOrDNDQ', 'cSHMqA9zfkA', 'lvJz679M6aE', 'yH_2jN0aY2w', 'UhG_BItojWg', '5NEUn1zgMME', 'ztM7Q-Qm-CQ', 'E4fol47EM50', '0AI7J0uxKv0', '2k61CPt_1Zo', 'dMnCBL40Bfg', 'NoiHcK4pkps']                                                                                                 [2021-08-24 23:54:58] [INFO] red.core.cogs.Streams: Stream with name HAACHAMA Ch 赤井はあと seems to not exist, will retry later
[2021-08-24 23:54:58] [INFO] red.core.cogs.Streams: Stream with name Sachi Saiki 才気桜千 Channel seems to not exist, will retry later
<truncated>
[2021-08-24 23:54:58] [DEBUG] red.core.cogs.Streams: livestreams for Mori Calliope Ch. hololive-EN: ['PluDFsVo3z0']
[2021-08-24 23:54:58] [DEBUG] red.core.cogs.Streams: not_livestreams for Mori Calliope Ch. hololive-EN: ['EawC9vslIw8', 'MIcFDAxQh0g', 'hPRoh9XPxn4', '9OtR59JTcMU', 'pjSojAEp48M', 'eAr-NGty9vI', '75d6uskxTpY', 'RUZZd0q1cGQ', 't691HA_OHnE', '1dlWRiPeeic', 'QPK2gk2WNrw', 'A2kVbF3m8HI', '_nX02E3i4rk', 'ZshHgTtCJag', 'xd5p2MH1tiQ']

<truncated until next poll>

[2021-08-24 23:58:01] [DEBUG] red.core.cogs.Streams: livestreams for Gawr Gura Ch. hololive-EN: []
[2021-08-24 23:58:01] [DEBUG] red.core.cogs.Streams: not_livestreams for Gawr Gura Ch. hololive-EN: ['34qwR8XmkiI', 'TApuosFkpHU', 'aAPSCyFo6Ks', 'S_wquDzkCvw', 'mOD8S1A93FU', 'cW2Gu6Wmg8o', 'VhM4FoxqdZ8', '_7b01SjiiBE', 'IFK-GNj8Fts', 'e-WXpylijus', 'YhmEqefSZZc', 'zuIDDWQlUWg', 'Ds71TFQCr5c', 'jPJSTCAgyjE', 'nKHypEjnRXE', 'JGyaMXShc4g', 'zNadRmlBn4k']
<truncated>
[2021-08-24 23:58:01] [DEBUG] red.core.cogs.Streams: livestreams for HAACHAMA Ch 赤井はあと: []
[2021-08-24 23:58:01] [DEBUG] red.core.cogs.Streams: not_livestreams for HAACHAMA Ch 赤井はあと: ['mdFl1sTBn_w', 'P6DcLalmvkI', 'IjbOzggZYE4', 'y1DwPRiq4oo', '9XMs-OcTnQw', 'ATDnxsdCzqU', '2OQDO7GMep4', 'uc4Qw6fKvEI', 'I5sCLXy8sjw', 'mhB4915XKJo', 'vGi6U_mS4g8', 'ilejfByx_0U', 'q5wfoXWuVfw', '-Jl9PAdb9HM', 'cX7HlTvJ-T4', 'UpVise2FH2E']
[2021-08-24 23:58:01] [INFO] red.core.cogs.Streams: Stream with name Sachi Saiki 才気桜千 Channel seems to not exist, will retry later
[2021-08-24 23:58:01] [INFO] red.core.cogs.Streams: Stream with name Mori Calliope Ch. hololive-EN seems to not exist, will retry later

Seeing that it's doing what I expect it to do, I'm open to feedback.

Seeing more of this being caught: ``` [2021-08-24 23:51:54] [DEBUG] red.core.cogs.Streams: livestreams for Gawr Gura Ch. hololive-EN: [] [2021-08-24 23:51:54] [DEBUG] red.core.cogs.Streams: not_livestreams for Gawr Gura Ch. hololive-EN: ['34qwR8XmkiI', 'TApuosFkpHU', 'aAPSCyFo6Ks', 'S_wquDzkCvw', 'mOD8S1A93FU', 'cW2Gu6Wmg8o', 'VhM4FoxqdZ8', '_7b01SjiiBE', 'IFK-GNj8Fts', 'e-WXpylijus', 'YhmEqefSZZc', 'zuIDDWQlUWg', 'Ds71TFQCr5c', 'jPJSTCAgyjE', 'nKHypEjnRXE', 'JGyaMXShc4g', 'zNadRmlBn4k'] [2021-08-24 23:51:54] [DEBUG] red.core.cogs.Streams: video_id not in not_livestreams: 5efPwIA_PQQ [2021-08-24 23:51:54] [DEBUG] red.core.cogs.Streams: stream_data for 5efPwIA_PQQ: {'actualStartTime': '2021-08-25T05:05:37Z', 'scheduledStartTime': '2021-08-25T05:05:00Z', 'concurrentViewers': '5718', 'activeLiveChatId': 'Cg0KCzVlZlB3SUFfUFFRKicKGFVDeWwxejNqbzNYSFIxcmlMRktHNVVBZxILNWVmUHdJQV9QUVE'} <truncated> [2021-08-24 23:51:54] [DEBUG] red.core.cogs.Streams: livestreams for Watson Amelia Ch. hololive-EN: ['5efPwIA_PQQ'] [2021-08-24 23:51:54] [DEBUG] red.core.cogs.Streams: not_livestreams for Watson Amelia Ch. hololive-EN: ['0iSKEkdDAKA', 'GpVDj43ioMo', 'wSmNK842gs8', 'Nn9AGOrDNDQ', 'cSHMqA9zfkA', 'lvJz679M6aE', 'yH_2jN0aY2w', 'UhG_BItojWg', '5NEUn1zgMME', 'ztM7Q-Qm-CQ', 'E4fol47EM50', '0AI7J0uxKv0', '2k61CPt_1Zo', 'dMnCBL40Bfg', 'NoiHcK4pkps'] <truncated> [2021-08-24 23:51:55] [DEBUG] red.core.cogs.Streams: livestreams for HAACHAMA Ch 赤井はあと: [] [2021-08-24 23:51:55] [DEBUG] red.core.cogs.Streams: not_livestreams for HAACHAMA Ch 赤井はあと: ['mdFl1sTBn_w', 'P6DcLalmvkI', 'IjbOzggZYE4', 'y1DwPRiq4oo', '9XMs-OcTnQw', 'ATDnxsdCzqU', '2OQDO7GMep4', 'uc4Qw6fKvEI', 'I5sCLXy8sjw', 'mhB4915XKJo', 'vGi6U_mS4g8', 'ilejfByx_0U', 'q5wfoXWuVfw', '-Jl9PAdb9HM', 'cX7HlTvJ-T4', 'UpVise2FH2E'] [2021-08-24 23:51:55] [INFO] red.core.cogs.Streams: Stream with name Sachi Saiki 才気桜千 Channel seems to not exist, will retry later [2021-08-24 23:51:55] [DEBUG] red.core.cogs.Streams: video_id not in not_livestreams: PluDFsVo3z0 [2021-08-24 23:51:55] [DEBUG] red.core.cogs.Streams: stream_data for PluDFsVo3z0: {'scheduledStartTime': '2021-08-26T14:00:00Z', 'activeLiveChatId': 'Cg0KC1BsdURGc1ZvM3owKicKGFVDTF9xaGd0T3kwZHkxQWdwOHZreVNRZxILUGx1REZzVm8zejA'} <truncated until next poll> [2021-08-24 23:54:58] [INFO] red.core.cogs.Streams: Stream with name Gawr Gura Ch. hololive-EN seems to not exist, will retry later <truncated> [2021-08-24 23:54:58] [DEBUG] red.core.cogs.Streams: livestreams for Watson Amelia Ch. hololive-EN: ['5efPwIA_PQQ'] [2021-08-24 23:54:58] [DEBUG] red.core.cogs.Streams: not_livestreams for Watson Amelia Ch. hololive-EN: ['0iSKEkdDAKA', 'GpVDj43ioMo', 'wSmNK842gs8', 'Nn9AGOrDNDQ', 'cSHMqA9zfkA', 'lvJz679M6aE', 'yH_2jN0aY2w', 'UhG_BItojWg', '5NEUn1zgMME', 'ztM7Q-Qm-CQ', 'E4fol47EM50', '0AI7J0uxKv0', '2k61CPt_1Zo', 'dMnCBL40Bfg', 'NoiHcK4pkps'] [2021-08-24 23:54:58] [INFO] red.core.cogs.Streams: Stream with name HAACHAMA Ch 赤井はあと seems to not exist, will retry later [2021-08-24 23:54:58] [INFO] red.core.cogs.Streams: Stream with name Sachi Saiki 才気桜千 Channel seems to not exist, will retry later <truncated> [2021-08-24 23:54:58] [DEBUG] red.core.cogs.Streams: livestreams for Mori Calliope Ch. hololive-EN: ['PluDFsVo3z0'] [2021-08-24 23:54:58] [DEBUG] red.core.cogs.Streams: not_livestreams for Mori Calliope Ch. hololive-EN: ['EawC9vslIw8', 'MIcFDAxQh0g', 'hPRoh9XPxn4', '9OtR59JTcMU', 'pjSojAEp48M', 'eAr-NGty9vI', '75d6uskxTpY', 'RUZZd0q1cGQ', 't691HA_OHnE', '1dlWRiPeeic', 'QPK2gk2WNrw', 'A2kVbF3m8HI', '_nX02E3i4rk', 'ZshHgTtCJag', 'xd5p2MH1tiQ'] <truncated until next poll> [2021-08-24 23:58:01] [DEBUG] red.core.cogs.Streams: livestreams for Gawr Gura Ch. hololive-EN: [] [2021-08-24 23:58:01] [DEBUG] red.core.cogs.Streams: not_livestreams for Gawr Gura Ch. hololive-EN: ['34qwR8XmkiI', 'TApuosFkpHU', 'aAPSCyFo6Ks', 'S_wquDzkCvw', 'mOD8S1A93FU', 'cW2Gu6Wmg8o', 'VhM4FoxqdZ8', '_7b01SjiiBE', 'IFK-GNj8Fts', 'e-WXpylijus', 'YhmEqefSZZc', 'zuIDDWQlUWg', 'Ds71TFQCr5c', 'jPJSTCAgyjE', 'nKHypEjnRXE', 'JGyaMXShc4g', 'zNadRmlBn4k'] <truncated> [2021-08-24 23:58:01] [DEBUG] red.core.cogs.Streams: livestreams for HAACHAMA Ch 赤井はあと: [] [2021-08-24 23:58:01] [DEBUG] red.core.cogs.Streams: not_livestreams for HAACHAMA Ch 赤井はあと: ['mdFl1sTBn_w', 'P6DcLalmvkI', 'IjbOzggZYE4', 'y1DwPRiq4oo', '9XMs-OcTnQw', 'ATDnxsdCzqU', '2OQDO7GMep4', 'uc4Qw6fKvEI', 'I5sCLXy8sjw', 'mhB4915XKJo', 'vGi6U_mS4g8', 'ilejfByx_0U', 'q5wfoXWuVfw', '-Jl9PAdb9HM', 'cX7HlTvJ-T4', 'UpVise2FH2E'] [2021-08-24 23:58:01] [INFO] red.core.cogs.Streams: Stream with name Sachi Saiki 才気桜千 Channel seems to not exist, will retry later [2021-08-24 23:58:01] [INFO] red.core.cogs.Streams: Stream with name Mori Calliope Ch. hololive-EN seems to not exist, will retry later ``` Seeing that it's doing what I expect it to do, I'm open to feedback.
Jackenmen (Migrated from github.com) reviewed 2021-09-03 00:28:54 +02:00
Jackenmen (Migrated from github.com) left a comment

I quite like this approach. The implementation here is fine, I am only not really sure that keeping MAX_RETRY_COUNT at 20 is appropriate here. With a default refresh time of 5 minutes (which is the lowest recommended one to avoid running into rate limiting issues with YT), that's 1h40m before we declare the stream as non-existent. I would think that something like 5 retries (across 25 minutes) would be more than enough?
@Injabie3 from your experience with this issue, would it still solve it?

@Kowlin, @PredaaA what do you think about keeping it at 5 retries, does it make sense?

I quite like this approach. The implementation here is fine, I am only not really sure that keeping `MAX_RETRY_COUNT` at 20 is appropriate here. With a default refresh time of 5 minutes (which is the lowest recommended one to avoid running into rate limiting issues with YT), that's 1h40m before we declare the stream as non-existent. I would think that something like 5 retries (across 25 minutes) would be more than enough? @Injabie3 from your experience with this issue, would it still solve it? @Kowlin, @PredaaA what do you think about keeping it at 5 retries, does it make sense?
Injabie3 commented 2021-09-03 02:10:53 +02:00 (Migrated from github.com)

Right, I forgot 5 minutes was the default. I've seen it brown out for ~30 minutes before, so that would mean 6 retries. How would 10 sound? I guess that would put us at 50 minutes.

Right, I forgot 5 minutes was the default. I've seen it brown out for ~30 minutes before, so that would mean 6 retries. How would 10 sound? I guess that would put us at 50 minutes.
Jackenmen commented 2021-09-03 02:27:50 +02:00 (Migrated from github.com)

How would 10 sound?

Seems high but if you're saying that the brownout might take even that long, I guess it will just have to do.

> How would 10 sound? Seems high but if you're saying that the brownout might take even that long, I guess it will just have to do.
Kowlin commented 2021-09-03 04:35:11 +02:00 (Migrated from github.com)

@jack1142 5 retries sounds fine with me.

@jack1142 5 retries sounds fine with me.
Jackenmen (Migrated from github.com) approved these changes 2021-09-03 16:24:55 +02:00
Jackenmen (Migrated from github.com) left a comment

Let's just go with 10 as you suggested, I don't think it can really cause any issues anyway. Thanks again for PRing this, it's quite helpful.

Let's just go with 10 as you suggested, I don't think it can really cause any issues anyway. Thanks again for PRing this, it's quite helpful. ![](https://i.fluffy.cc/3X84Bq2RR182XcPr0NTKKCp7wvNT8MhD.gif)
red-githubbot[bot] commented 2021-09-08 22:25:17 +02:00 (Migrated from github.com)

Thanks Injabie3 for the PR 🎉. I'm working now to backport this PR to: 3.4.

Thanks Injabie3 for the PR 🎉. I'm working now to backport this PR to: 3.4.
red-githubbot[bot] commented 2021-09-08 22:25:23 +02:00 (Migrated from github.com)

#5289 is a backport of this pull request to Red 3.4.

#5289 is a backport of this pull request to [Red 3.4](https://github.com/Cog-Creators/Red-DiscordBot/tree/3.4).
Sign in to join this conversation.
No labels
Automated PR
Blocked
Blocked By: Damage Control
Blocked By: Dependency
Blocked By: Other PR
Breaking Change
Category: CI
Category: Cogs - Admin
Category: Cogs - Alias
Category: Cogs - Audio
Category: Cogs - Bank
Category: Cogs - Cleanup
Category: Cogs - CustomCommands
Category: Cogs - Dev
Category: Cogs - Downloader
Category: Cogs - Economy
Category: Cogs - Filter
Category: Cogs - General
Category: Cogs - Image
Category: Cogs - Mod
Category: Cogs - Modlog
Category: Cogs - Mutes
Category: Cogs - Permissions
Category: Cogs - Reports
Category: Cogs - Streams
Category: Cogs - Trivia
Category: Cogs - Trivia - Lists
Category: Cogs - Warnings
Category: Core - API - App Commands Package
Category: Core - API - Audio
Category: Core - API - Bank
Category: Core - API - Commands Package
Category: Core - API - Config
Category: Core - API - Other
Category: Core - API - Utils Package
Category: Core - Bot Class
Category: Core - Bot Commands
Category: Core - Command-line Interfaces
Category: Core - Downloader
Category: Core - Help
Category: Core - i18n
Category: Core - Modlog
Category: Core - Other Internals
Category: Core - RPC/ZMQ
Category: Docker
Category: Docs - Changelogs
Category: Docs - For Developers
Category: Docs - Install Guides
Category: Docs - Other
Category: Docs - User Guides
Category: Meta
Category: RPC/ZMQ methods
Category: Vendored Packages
Changelog Entry: Added
Changelog Entry: Pending
Changelog Entry: Skipped
Closed: Duplicate
Closed: External
Closed: Invalid
Closed: User Error
Closed: Won't Fix
Complex Issue
Docs-only
Feature Branch
Good First Issue
Help Wanted
High Priority
Needs Backport To stable-docs
No Activity
No Repro
QA: Bypassed
QA: Changes Requested
QA: Passed
Release Blocker
Status: Accepted
Status: Frozen
Status: In Progress
Status: Needs Discussion
Status: Needs Info
Status: Needs Triage
Status: PRs Welcome
Type: Bug
Type: Dependency Update
Type: Deprecation
Type: Enhancement
Type: Feature
Type: Informational
Type: Merge
Type: Optimisation
Type: Question
Type: Removal
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
Mrcoolgamer11/Red-DiscordBot!5223
No description provided.