|
|
|
@ -240,7 +240,7 @@ func handler(rawEvt interface{}) { |
|
|
|
} |
|
|
|
case *events.HistorySync: |
|
|
|
id := atomic.AddInt32(&historySyncID, 1) |
|
|
|
fileName := fmt.Sprintf("%s/history-%d-%d.json", config.PathStorages, startupTime, id) |
|
|
|
fileName := fmt.Sprintf("%s/history-%d-%s-%d-%s.json", config.PathStorages, startupTime, cli.Store.ID.String(), id, evt.Data.SyncType.String()) |
|
|
|
file, err := os.OpenFile(fileName, os.O_WRONLY|os.O_CREATE, 0600) |
|
|
|
if err != nil { |
|
|
|
log.Errorf("Failed to open file to write history sync: %v", err) |
|
|
|
|