send warning to slack when video processing panics

This commit is contained in:
Niko Storni 2019-12-27 01:39:27 +01:00
parent 59471f9c26
commit c28d5a716b

View file

@ -1088,7 +1088,7 @@ Enqueue:
func (s *Sync) processVideo(v video) (err error) { func (s *Sync) processVideo(v video) (err error) {
defer func() { defer func() {
if p := recover(); p != nil { if p := recover(); p != nil {
log.Printf("stack: %s", debug.Stack()) logUtils.SendErrorToSlack("Video processing panic! %s", debug.Stack())
var ok bool var ok bool
err, ok = p.(error) err, ok = p.(error)
if !ok { if !ok {