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

Commit

Permalink
tests(BUX-320): set sync interval to 15min, add action to force sync
Browse files Browse the repository at this point in the history
  • Loading branch information
arkadiuszos4chain committed Nov 28, 2023
1 parent ad09846 commit 5a78b08
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
6 changes: 6 additions & 0 deletions admin_actions_stats.go
Original file line number Diff line number Diff line change
Expand Up @@ -100,3 +100,9 @@ func (c *Client) GetStats(ctx context.Context, opts ...ModelOps) (*AdminStats, e
XPubs: xpubsCount,
}, nil
}

func (c *Client) ForceSync(ctx context.Context) error {
logClient := c.Logger()
logClient.Info(ctx, "FORCE running sync transaction(s) task...")
return taskSyncTransactions(ctx, c, WithClient(c))
}
4 changes: 2 additions & 2 deletions definitions.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@ const (
taskIntervalMonitorCheck = defaultMonitorHeartbeat * time.Second // Default task time for cron jobs (seconds)
taskIntervalProcessIncomingTxs = 30 * time.Second // Default task time for cron jobs (seconds)
taskIntervalSyncActionBroadcast = 30 * time.Second // Default task time for cron jobs (seconds)
taskIntervalSyncActionSync = 120 * time.Second // Default task time for cron jobs (seconds)
taskIntervalTransactionCheck = 60 * time.Second // Default task time for cron jobs (seconds)
taskIntervalSyncActionSync = 900 * time.Second // Default task time for cron jobs (seconds)
taskIntervalTransactionCheck = 3000 * time.Second // Default task time for cron jobs (seconds)
)

// All the base models
Expand Down

0 comments on commit 5a78b08

Please sign in to comment.