Merge pull request #13 from Selly-Modules/develop

logs-test
This commit is contained in:
Minh Nguyen 2022-03-25 14:31:29 +07:00 committed by GitHub
commit 814cac5e3e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 0 deletions

View File

@ -34,12 +34,17 @@ func (s SyncToService) syncData() {
// handleSyncDataToServiceAppier ... // handleSyncDataToServiceAppier ...
func handleSyncDataToServiceAppier(pattern string, typeData string) { func handleSyncDataToServiceAppier(pattern string, typeData string) {
fmt.Println("keyProductPattern", pattern)
for { for {
keys, values := redisdb.GetWithPrefixPattern(pattern, limitGetKeyRedis) keys, values := redisdb.GetWithPrefixPattern(pattern, limitGetKeyRedis)
if len(keys) == 0 { if len(keys) == 0 {
return return
} }
fmt.Println("keys:", keys)
fmt.Println("values", values)
payload := toBytes(values) payload := toBytes(values)
// Convert data // Convert data
switch typeData { switch typeData {