mirror of
https://github.com/pikami/tiktok-dl.git
synced 2024-11-25 09:15:41 +00:00
21 lines
540 B
Go
21 lines
540 B
Go
package workflows
|
|
|
|
import (
|
|
config "github.com/pikami/tiktok-dl/models/config"
|
|
res "github.com/pikami/tiktok-dl/resources"
|
|
fileio "github.com/pikami/tiktok-dl/utils/fileio"
|
|
log "github.com/pikami/tiktok-dl/utils/log"
|
|
)
|
|
|
|
// OnWorkflowFail - Function called when workflow fails
|
|
func OnWorkflowFail(err error, workItem string) {
|
|
failLogFilePath := config.Config.FailLogFilePath
|
|
|
|
if failLogFilePath != "" {
|
|
fileio.AppendToFile(workItem, failLogFilePath)
|
|
}
|
|
|
|
log.LogErr(res.Error, err.Error())
|
|
log.LogErr(res.FailedOnItem, workItem)
|
|
}
|