Adjust sync timings for better batching behavior
- Increase flush debounce from 1s to 30s (provides transaction window for batch operations) - Increase daemon poll from 2s to 5s (reduces commit spam) - Agents should run 'bd sync' at end of session to force immediate commit - Prevents creating dozens of commits when making multiple issue changes
This commit is contained in:
@@ -462,12 +462,12 @@ var rootCmd = &cobra.Command{
|
||||
|
||||
// getDebounceDuration returns the auto-flush debounce duration
|
||||
// Configurable via config file or BEADS_FLUSH_DEBOUNCE env var (e.g., "500ms", "10s")
|
||||
// Defaults to 1 second if not set or invalid
|
||||
// Defaults to 30 seconds if not set or invalid (provides batching window)
|
||||
func getDebounceDuration() time.Duration {
|
||||
duration := config.GetDuration("flush-debounce")
|
||||
if duration == 0 {
|
||||
// If parsing failed, use default
|
||||
return 1 * time.Second
|
||||
return 30 * time.Second
|
||||
}
|
||||
return duration
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user