fix 上传爬虫错误的问题

This commit is contained in:
陈景阳
2019-09-27 11:49:57 +08:00
parent f5371f94a4
commit bc6dc22014
2 changed files with 3 additions and 2 deletions

View File

@@ -107,6 +107,7 @@ func (s *SpiderSync) Download() {
// 解压缩临时文件到目标文件夹
dstPath := filepath.Join(
viper.GetString("spider.path"),
s.Spider.Name,
)
if err := utils.DeCompress(tmpFile, dstPath); err != nil {
log.Errorf(err.Error())

View File

@@ -36,9 +36,9 @@ func init() {
s = SpiderSync{
Spider: model.Spider{
Id: bson.ObjectIdHex("5d8d5e4b44500b000150009c"),
Id: bson.ObjectIdHex("5d8d8326bc3c4f000186e5df"),
Name: "scrapy-pre_sale",
FileId: bson.ObjectIdHex("5d8d5e4b44500b0001500098"),
FileId: bson.ObjectIdHex("5d8d8326bc3c4f000186e5db"),
Src: "/opt/crawlab/spiders/scrapy-pre_sale",
},
}