2020-01-24 19:02:50 +02:00
|
|
|
package workflows
|
|
|
|
|
|
|
|
import (
|
2020-02-08 01:51:17 +02:00
|
|
|
res "../resources"
|
2020-01-24 19:02:50 +02:00
|
|
|
utils "../utils"
|
|
|
|
)
|
|
|
|
|
|
|
|
// CanUseDownloadBatchFile - Check's if DownloadBatchFile can be used
|
|
|
|
func CanUseDownloadBatchFile(batchFilePath string) bool {
|
|
|
|
return batchFilePath != ""
|
|
|
|
}
|
|
|
|
|
|
|
|
// DownloadBatchFile - Download items from batch file
|
|
|
|
func DownloadBatchFile(batchFilePath string) {
|
|
|
|
if !utils.CheckIfExists(batchFilePath) {
|
2020-02-08 01:51:17 +02:00
|
|
|
utils.LogFatal(res.ErrorPathNotFound, batchFilePath)
|
2020-01-24 19:02:50 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
utils.ReadFileLineByLine(batchFilePath, downloadItem)
|
|
|
|
}
|
|
|
|
|
|
|
|
func downloadItem(batchItem string) {
|
|
|
|
if batchItem[0] == '#' {
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
2020-01-26 19:44:25 +02:00
|
|
|
StartWorkflowByParameter(batchItem)
|
2020-01-24 19:02:50 +02:00
|
|
|
}
|