mirror of
https://github.com/simon987/feed_archiver.git
synced 2025-04-10 14:16:49 +00:00
Compare commits
2 Commits
a09e87668e
...
e8ea4ff1dd
Author | SHA1 | Date | |
---|---|---|---|
e8ea4ff1dd | |||
9ac16ae71e |
@ -1,5 +1,5 @@
|
||||
# Build
|
||||
FROM golang:1.13 as go_build
|
||||
FROM golang:1.15 as go_build
|
||||
WORKDIR /build/
|
||||
|
||||
COPY main.go .
|
||||
|
24
main.go
24
main.go
@ -23,13 +23,14 @@ var pool *pgx.ConnPool
|
||||
var replacer = strings.NewReplacer(".", "_")
|
||||
|
||||
type FeedArchiverArgs struct {
|
||||
DbHost string
|
||||
DbUser string
|
||||
DbPassword string
|
||||
DbDatabase string
|
||||
RedisAddr string
|
||||
Pattern string
|
||||
Threads int
|
||||
DbHost string
|
||||
DbUser string
|
||||
DbPassword string
|
||||
DbDatabase string
|
||||
RedisAddr string
|
||||
RedisPassword string
|
||||
Pattern string
|
||||
Threads int
|
||||
}
|
||||
|
||||
func main() {
|
||||
@ -74,6 +75,13 @@ func main() {
|
||||
Value: "localhost:6379",
|
||||
EnvVars: []string{"FA_REDIS_ADDR"},
|
||||
},
|
||||
&cli.StringFlag{
|
||||
Name: "redis-password",
|
||||
Usage: "Redis password",
|
||||
Destination: &args.RedisPassword,
|
||||
Value: "",
|
||||
EnvVars: []string{"FA_REDIS_PASSWORD"},
|
||||
},
|
||||
&cli.StringFlag{
|
||||
Name: "pattern",
|
||||
Usage: "redis arc pattern",
|
||||
@ -113,7 +121,7 @@ func main() {
|
||||
|
||||
rdb := redis.NewClient(&redis.Options{
|
||||
Addr: args.RedisAddr,
|
||||
Password: "",
|
||||
Password: args.RedisPassword,
|
||||
DB: 0,
|
||||
})
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user