Merge pull request #21 from Selly-Modules/develop

fix
This commit is contained in:
Minh Nguyen 2022-03-26 06:24:34 +07:00 committed by GitHub
commit 514a8cf433
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 3 deletions

View File

@ -42,7 +42,10 @@ func NewClient(config Config) (*Client, error) {
}
// Init schedule
initSchedule()
if config.IsScheduled {
initSchedule()
}
return client, nil
}

View File

@ -4,6 +4,7 @@ import "github.com/Selly-Modules/natsio"
// Config ...
type Config struct {
Redis RedisCfg
Nats natsio.Config
Redis RedisCfg
Nats natsio.Config
IsScheduled bool
}