Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TG upload sometimes doesn't work right #78

Closed
umputun opened this issue Apr 18, 2022 · 2 comments
Closed

TG upload sometimes doesn't work right #78

umputun opened this issue Apr 18, 2022 · 2 comments
Assignees
Labels

Comments

@umputun
Copy link
Owner

umputun commented Apr 18, 2022

In some cases uploaded files displayed with 00:00 duration in telegram and doesn't work well. Some are seems to be truncated.

The solution (rather a workaround) we have discussed with @paskal is to check if upladed file has the exceped duration prior to the message publishing and reupload (with some max attempts) if doesn't match

@umputun umputun added the bug label Apr 18, 2022
paskal added a commit that referenced this issue Apr 21, 2022
Potential resolution for #78 as the problem might be caused
by slow upload to Telegram, which causes the connection to the
server we're reading the file from to drop. In the new setup,
the application downloads the file first. Then uploads it to Telegram
(and calculates the track duration) at the speed
which is comfortable for Telegram, without making the uploading
server wait.
paskal added a commit that referenced this issue Apr 21, 2022
Potential resolution for #78 as the problem might be caused
by slow upload to Telegram, which causes the connection to the
server we're reading the file from to drop. In the new setup,
the application downloads the file first. Then uploads it to Telegram
(and calculates the track duration) at the speed
which is comfortable for Telegram, without making the uploading
server wait.
paskal added a commit that referenced this issue Apr 21, 2022
Potential resolution for #78 as the problem might be caused
by slow upload to Telegram, which causes the connection to the
server we're reading the file from to drop. In the new setup,
the application downloads the file first. Then uploads it to Telegram
(and calculates the track duration) at the speed
which is comfortable for Telegram, without making the uploading
server wait.
paskal added a commit that referenced this issue Apr 22, 2022
Potential resolution for #78 as the problem might be caused
by slow upload to Telegram, which causes the connection to the
server we're reading the file from to drop. In the new setup,
the application downloads the file first. Then uploads it to Telegram
(and calculates the track duration) at the speed
which is comfortable for Telegram, without making the uploading
server wait.
paskal added a commit that referenced this issue Apr 22, 2022
Potential resolution for #78 as the problem might be caused
by slow upload to Telegram, which causes the connection to the
server we're reading the file from to drop. In the new setup,
the application downloads the file first. Then uploads it to Telegram
(and calculates the track duration) at the speed
which is comfortable for Telegram, without making the uploading
server wait.
umputun pushed a commit that referenced this issue Apr 22, 2022
Potential resolution for #78 as the problem might be caused
by slow upload to Telegram, which causes the connection to the
server we're reading the file from to drop. In the new setup,
the application downloads the file first. Then uploads it to Telegram
(and calculates the track duration) at the speed
which is comfortable for Telegram, without making the uploading
server wait.
@umputun
Copy link
Owner Author

umputun commented Apr 24, 2022

We have addressed the root cause (well, most likely) as well as several related issues:

  • the sync (outside of this project) does rsync for all the files together and we may run into unfortunate timing with xml files already uploaded, but mp3 not yet, or partially available. This was addressed by splitting the sync and copying mp3 files first (to all nodes) and xmls after this
  • item's load didn't check the status code and this led to uploading the error page instead of failing on the error. This one was fixed
  • to make tg upload more reliable we have added retries, up to 10 times with 1s delay
  • we have optimized duration detection for items with already presented duration

All of this should resolve the issue and make tg upload great again.

@umputun
Copy link
Owner Author

umputun commented May 3, 2022

this one seems to be resolved

@umputun umputun closed this as completed May 3, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants