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

server: Update NonRetryable errors to latest LPMS #1823

Merged
merged 4 commits into from
Apr 8, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions CHANGELOG_PENDING.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,9 @@
#### General

- \#1810 Display "n/a" in CLI when max gas price isn't specified (@kyriediculous)

### Features ⚒

#### Broadcaster

- \#1823 Mark more transcoder errors as NonRetryable (@jailuthra)
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ require (
github.com/influxdata/influxdb v1.7.8 // indirect
github.com/jackpal/go-nat-pmp v1.0.1 // indirect
github.com/karalabe/usb v0.0.0-20190919080040-51dc0efba356 // indirect
github.com/livepeer/lpms v0.0.0-20210216144135-b4601518b202
github.com/livepeer/lpms v0.0.0-20210405233628-731af8d684c5
github.com/livepeer/m3u8 v0.11.1
github.com/mattn/go-colorable v0.1.2 // indirect
github.com/mattn/go-sqlite3 v1.11.0
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -211,8 +211,8 @@ github.com/kr/text v0.1.0 h1:45sCR5RtlFHMR4UwH9sdQ5TC8v0qDQCHnXt+kaKSTVE=
github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI=
github.com/livepeer/joy4 v0.1.2-0.20191121080656-b2fea45cbded h1:ZQlvR5RB4nfT+cOQee+WqmaDOgGtP2oDMhcVvR4L0yA=
github.com/livepeer/joy4 v0.1.2-0.20191121080656-b2fea45cbded/go.mod h1:xkDdm+akniYxVT9KW1Y2Y7Hso6aW+rZObz3nrA9yTHw=
github.com/livepeer/lpms v0.0.0-20210216144135-b4601518b202 h1:lVP7t871D/upeaV9Mr8W1PYoyKl8a2CTVjxvOH35Fw4=
github.com/livepeer/lpms v0.0.0-20210216144135-b4601518b202/go.mod h1:POdMzwnvPmf6UgRkaXGP/ZI7akrzHhzjCNygZej3gzc=
github.com/livepeer/lpms v0.0.0-20210405233628-731af8d684c5 h1:S1nPIefPjiwdrmkrjvQ7fXu+JfwGhI8zxdkeVPL4akI=
github.com/livepeer/lpms v0.0.0-20210405233628-731af8d684c5/go.mod h1:POdMzwnvPmf6UgRkaXGP/ZI7akrzHhzjCNygZej3gzc=
github.com/livepeer/m3u8 v0.11.1 h1:VkUJzfNTyjy9mqsgp5JPvouwna8wGZMvd/gAfT5FinU=
github.com/livepeer/m3u8 v0.11.1/go.mod h1:IUqAtwWPAG2CblfQa4SVzTQoDcEMPyfNOaBSxqHMS04=
github.com/mattn/go-colorable v0.1.2 h1:/bC9yWikZXAL9uJdulbSfyVNIR3n3trXl+v8+1sx8mU=
Expand Down
18 changes: 11 additions & 7 deletions server/broadcast.go
Original file line number Diff line number Diff line change
Expand Up @@ -870,12 +870,16 @@ func getSegDurMsString(seg *stream.HLSSegment) string {
return strconv.Itoa(int(seg.Duration * 1000))
}

func isNonRetryableError(e error) bool {
foundErr := false
for _, v := range ffmpeg.LPMSErrors {
if e.Error() == v.Desc {
foundErr = true
}
func nonRetryableErrMapInit() map[string]bool {
errs := make(map[string]bool)
for _, v := range ffmpeg.NonRetryableErrs {
yondonfu marked this conversation as resolved.
Show resolved Hide resolved
errs[v] = true
}
return foundErr
return errs
}

var NonRetryableErrMap = nonRetryableErrMapInit()

func isNonRetryableError(e error) bool {
return NonRetryableErrMap[e.Error()]
}