mirror of
https://github.com/cgrates/cgrates.git
synced 2026-02-11 18:16:24 +05:00
Review cgr-console to work in batch mode
This commit is contained in:
committed by
Dan Christian Bogos
parent
b5ad475434
commit
c6ede2898e
@@ -129,12 +129,12 @@ func main() {
|
||||
client, err = rpcclient.NewRpcClient("tcp", *server, *tls, *keyPath, *certificatePath, *caPath, 3, 3,
|
||||
time.Duration(1*time.Second), time.Duration(5*time.Minute), strings.TrimPrefix(*rpcEncoding, utils.Meta), nil, false)
|
||||
if err != nil {
|
||||
flag.PrintDefaults()
|
||||
cgrConsoleFlags.PrintDefaults()
|
||||
log.Fatal("Could not connect to server " + *server)
|
||||
}
|
||||
|
||||
if len(flag.Args()) != 0 {
|
||||
executeCommand(strings.Join(flag.Args(), " "))
|
||||
if len(cgrConsoleFlags.Args()) != 0 {
|
||||
executeCommand(strings.Join(cgrConsoleFlags.Args(), " "))
|
||||
return
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user