Bugfix folder not found
All checks were successful
release-tag / release-image (push) Successful in 1m40s
All checks were successful
release-tag / release-image (push) Successful in 1m40s
This commit is contained in:
@@ -38,6 +38,8 @@ services:
|
|||||||
networks:
|
networks:
|
||||||
- flod_nw
|
- flod_nw
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
|
volumes:
|
||||||
|
- importer-lists:/lists
|
||||||
|
|
||||||
redis:
|
redis:
|
||||||
image: redis:7-alpine
|
image: redis:7-alpine
|
||||||
@@ -68,3 +70,4 @@ networks:
|
|||||||
|
|
||||||
volumes:
|
volumes:
|
||||||
redis-data:
|
redis-data:
|
||||||
|
importer-lists:
|
||||||
|
3
main.go
3
main.go
@@ -707,6 +707,9 @@ func fetchAndSave(client *http.Client, t target, outDir string) error {
|
|||||||
func importBlocklists() error {
|
func importBlocklists() error {
|
||||||
client := &http.Client{Timeout: 60 * time.Second}
|
client := &http.Client{Timeout: 60 * time.Second}
|
||||||
t := target{Name: "Catalog", URL: "http://importer:8080/lists.json"}
|
t := target{Name: "Catalog", URL: "http://importer:8080/lists.json"}
|
||||||
|
if err := os.MkdirAll("./lists/", 0o755); err != nil {
|
||||||
|
fmt.Println("creating output dir", err)
|
||||||
|
}
|
||||||
if err := fetchAndSave(client, t, "./lists/"); err != nil {
|
if err := fetchAndSave(client, t, "./lists/"); err != nil {
|
||||||
log.Printf("ERROR %s → %v", t.URL, err)
|
log.Printf("ERROR %s → %v", t.URL, err)
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user