fix: debounce is too long (#1426)

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

- **Refactor**
- Reduced the delay before configuration changes are processed,
resulting in faster response times to configuration updates throughout
the application.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
This commit is contained in:
Eli Bosley
2025-06-20 11:07:53 -04:00
committed by GitHub
parent 75ad8381bd
commit f12d231e63
4 changed files with 4 additions and 7 deletions

View File

@@ -42,8 +42,7 @@ export class PluginNameConfigPersister implements OnModuleInit {
}
// Automatically persist changes to the config file after a short delay.
const HALF_SECOND = 500;
this.configService.changes$.pipe(debounceTime(HALF_SECOND)).subscribe({
this.configService.changes$.pipe(debounceTime(25)).subscribe({
next: ({ newValue, oldValue, path: changedPath }) => {
// Only persist if the change is within this plugin's config namespace
if (changedPath.startsWith("plugin-name.") && newValue !== oldValue) {