mirror of
https://github.com/ddworken/hishtory.git
synced 2025-06-25 06:22:24 +02:00
Make uploading skipped history entries more efficient and use only one HTTP request
This commit is contained in:
parent
c16d260643
commit
9bfd4bf173
@ -263,8 +263,7 @@ func maybeUploadSkippedHistoryEntries(ctx *context.Context) error {
|
||||
return fmt.Errorf("failed to retrieve history entries that haven't been uploaded yet: %v", err)
|
||||
}
|
||||
hctx.GetLogger().Printf("Uploading %d history entries that previously failed to upload (query=%#v)\n", len(entries), query)
|
||||
for _, entry := range entries {
|
||||
jsonValue, err := lib.EncryptAndMarshal(config, []*data.HistoryEntry{entry})
|
||||
jsonValue, err := lib.EncryptAndMarshal(config, entries)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
@ -273,7 +272,6 @@ func maybeUploadSkippedHistoryEntries(ctx *context.Context) error {
|
||||
// Failed to upload the history entry, so we must still be offline. So just return nil and we'll try again later.
|
||||
return nil
|
||||
}
|
||||
}
|
||||
|
||||
// Mark down that we persisted it
|
||||
config.HaveMissedUploads = false
|
||||
|
Loading…
x
Reference in New Issue
Block a user