mirror of
https://github.com/hibiken/asynq.git
synced 2026-07-26 07:25:21 +08:00
Compare commits
2 Commits
sohail/uni
...
sohail/pm-
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
f1e7dc4056 | ||
|
|
ee17997650 |
@@ -24,10 +24,8 @@ func (srv *Server) waitForSignals() {
|
|||||||
if sig == unix.SIGTSTP {
|
if sig == unix.SIGTSTP {
|
||||||
srv.Stop()
|
srv.Stop()
|
||||||
continue
|
continue
|
||||||
} else {
|
|
||||||
srv.Stop()
|
|
||||||
break
|
|
||||||
}
|
}
|
||||||
|
break
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -40,7 +40,6 @@ var (
|
|||||||
useRedisCluster bool
|
useRedisCluster bool
|
||||||
clusterAddrs string
|
clusterAddrs string
|
||||||
tlsServerName string
|
tlsServerName string
|
||||||
insecure bool
|
|
||||||
)
|
)
|
||||||
|
|
||||||
// rootCmd represents the base command when called without any subcommands
|
// rootCmd represents the base command when called without any subcommands
|
||||||
@@ -315,8 +314,6 @@ func init() {
|
|||||||
"List of comma-separated redis server addresses")
|
"List of comma-separated redis server addresses")
|
||||||
rootCmd.PersistentFlags().StringVar(&tlsServerName, "tls_server",
|
rootCmd.PersistentFlags().StringVar(&tlsServerName, "tls_server",
|
||||||
"", "Server name for TLS validation")
|
"", "Server name for TLS validation")
|
||||||
rootCmd.PersistentFlags().BoolVar(&insecure, "insecure",
|
|
||||||
false, "Allow insecure TLS connection by skipping cert validation")
|
|
||||||
// Bind flags with config.
|
// Bind flags with config.
|
||||||
viper.BindPFlag("uri", rootCmd.PersistentFlags().Lookup("uri"))
|
viper.BindPFlag("uri", rootCmd.PersistentFlags().Lookup("uri"))
|
||||||
viper.BindPFlag("db", rootCmd.PersistentFlags().Lookup("db"))
|
viper.BindPFlag("db", rootCmd.PersistentFlags().Lookup("db"))
|
||||||
@@ -324,7 +321,6 @@ func init() {
|
|||||||
viper.BindPFlag("cluster", rootCmd.PersistentFlags().Lookup("cluster"))
|
viper.BindPFlag("cluster", rootCmd.PersistentFlags().Lookup("cluster"))
|
||||||
viper.BindPFlag("cluster_addrs", rootCmd.PersistentFlags().Lookup("cluster_addrs"))
|
viper.BindPFlag("cluster_addrs", rootCmd.PersistentFlags().Lookup("cluster_addrs"))
|
||||||
viper.BindPFlag("tls_server", rootCmd.PersistentFlags().Lookup("tls_server"))
|
viper.BindPFlag("tls_server", rootCmd.PersistentFlags().Lookup("tls_server"))
|
||||||
viper.BindPFlag("insecure", rootCmd.PersistentFlags().Lookup("insecure"))
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// initConfig reads in config file and ENV variables if set.
|
// initConfig reads in config file and ENV variables if set.
|
||||||
@@ -406,7 +402,7 @@ func getTLSConfig() *tls.Config {
|
|||||||
if tlsServer == "" {
|
if tlsServer == "" {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
return &tls.Config{ServerName: tlsServer, InsecureSkipVerify: viper.GetBool("insecure")}
|
return &tls.Config{ServerName: tlsServer}
|
||||||
}
|
}
|
||||||
|
|
||||||
// printTable is a helper function to print data in table format.
|
// printTable is a helper function to print data in table format.
|
||||||
|
|||||||
Reference in New Issue
Block a user