mirror of
https://github.com/simon987/imhashdb.git
synced 2025-04-10 14:16:43 +00:00
fix store flag
This commit is contained in:
parent
a25b5072a4
commit
46081a8355
14
cli/main.go
14
cli/main.go
@ -89,13 +89,6 @@ func main() {
|
|||||||
EnvVars: []string{"IMHASHDB_QUERY_CONCURRENCY"},
|
EnvVars: []string{"IMHASHDB_QUERY_CONCURRENCY"},
|
||||||
Destination: &Conf.QueryConcurrency,
|
Destination: &Conf.QueryConcurrency,
|
||||||
},
|
},
|
||||||
&cli.StringFlag{
|
|
||||||
Name: "store",
|
|
||||||
Value: "",
|
|
||||||
Usage: "If set, store downloaded images there",
|
|
||||||
EnvVars: []string{"IMHASHDB_STORE"},
|
|
||||||
Destination: &Conf.Store,
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -183,6 +176,13 @@ func main() {
|
|||||||
EnvVars: []string{"IMHASHDB_HASH_CONCURRENCY"},
|
EnvVars: []string{"IMHASHDB_HASH_CONCURRENCY"},
|
||||||
Destination: &Conf.HasherConcurrency,
|
Destination: &Conf.HasherConcurrency,
|
||||||
},
|
},
|
||||||
|
&cli.StringFlag{
|
||||||
|
Name: "store",
|
||||||
|
Value: "",
|
||||||
|
Usage: "If set, store downloaded images there",
|
||||||
|
EnvVars: []string{"IMHASHDB_STORE"},
|
||||||
|
Destination: &Conf.Store,
|
||||||
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
@ -144,11 +144,14 @@ func trimUrl(link string) string {
|
|||||||
return link
|
return link
|
||||||
}
|
}
|
||||||
|
|
||||||
var StoreData = Conf.Store != ""
|
var StoreData bool
|
||||||
var DataPath = Conf.Store
|
var DataPath string
|
||||||
var Pattern = "imhash.*"
|
var Pattern = "imhash.*"
|
||||||
|
|
||||||
func Main() error {
|
func Main() error {
|
||||||
|
StoreData = Conf.Store != ""
|
||||||
|
DataPath = Conf.Store
|
||||||
|
|
||||||
queue := make(chan []string)
|
queue := make(chan []string)
|
||||||
|
|
||||||
for i := 0; i < Conf.HasherConcurrency; i++ {
|
for i := 0; i < Conf.HasherConcurrency; i++ {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user