mirror of
https://github.com/pikami/tiktok-dl.git
synced 2025-02-05 15:26:38 +00:00
21 lines
439 B
Go
21 lines
439 B
Go
|
package workflows
|
||
|
|
||
|
import (
|
||
|
config "../models/config"
|
||
|
res "../resources"
|
||
|
fileio "../utils/fileio"
|
||
|
log "../utils/log"
|
||
|
)
|
||
|
|
||
|
// OnWorkflowFail - Funtion 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)
|
||
|
}
|