Skip to content
This repository has been archived by the owner on Apr 2, 2024. It is now read-only.

Commit

Permalink
Update the last_attempt time on success
Browse files Browse the repository at this point in the history
  • Loading branch information
mrz1836 committed Apr 28, 2022
1 parent 0c6dd71 commit 8f505d9
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion model_sync_transactions.go
Original file line number Diff line number Diff line change
Expand Up @@ -374,9 +374,15 @@ func processBroadcastTransaction(ctx context.Context, syncTx *SyncTransaction) e
// Create status message
message := "broadcast success"

// Update the sync status
// Update the sync information
syncTx.BroadcastStatus = SyncStatusComplete
syncTx.Results.LastMessage = message
syncTx.LastAttempt = utils.NullTime{
NullTime: sql.NullTime{
Time: time.Now().UTC(),
Valid: true,
},
}
syncTx.Results.Results = append(syncTx.Results.Results, &SyncResult{
Action: syncActionBroadcast,
ExecutedAt: time.Now().UTC(),
Expand Down

0 comments on commit 8f505d9

Please sign in to comment.