Skip to content

Commit

Permalink
feat: fix the garden concept and force disable cache env var
Browse files Browse the repository at this point in the history
  • Loading branch information
pestanko committed Apr 21, 2024
1 parent b933b11 commit bc6f2c3
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
3 changes: 2 additions & 1 deletion config/categories/food.yml
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,8 @@ pages:
homepage: https://www.gardenfoodconcept.cz/
tags: ["city", "gd"]
url: https://www.gardenfoodconcept.cz/poledni-menu/
resolver: url_only
resolver: img
query: ".b-img picture img"

- codename: stopkova
name: Stopkova Plzenska Pivnice
Expand Down
7 changes: 7 additions & 0 deletions internal/config/app_config.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
package config

import (
"os"

"github.com/pestanko/miniscrape/pkg/utils/applog"
"github.com/rs/zerolog/log"
"github.com/spf13/viper"
Expand Down Expand Up @@ -57,5 +59,10 @@ func GetAppConfig() *AppConfig {

log.Info().Interface("config", config).Msg("loaded config")

if noCache := os.Getenv("APP_NO_CACHE"); noCache == "true" {
log.Info().Msg("Cache is explictelly disabled")
config.Cache.Enabled = false
}

return &config
}

0 comments on commit bc6f2c3

Please sign in to comment.