diff --git a/CHANGELOG.md b/CHANGELOG.md index de5dfb9..6ee9204 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,7 @@ # UNRELEASED +# V0.9.4 + - Feat: Add `stale_scope` option to CRM DSL to restrict which records the `StaleRecords::Finder` considers. Accepts a lambda returning an ActiveRecord scope, applied at SQL level before any record is processed. This prevents unnecessary `CrmSynchronisation` rows for records that `sync_if` would skip. Models that do not specify `stale_scope` are not affected — the Finder behaves exactly as before. - Feat: Add `error_count` column to `crm_synchronisations` to track consecutive sync failures. Records exceeding the configurable `max_sync_errors` limit (default: 3) are automatically excluded from `StaleRecords::Finder`. The limit can be set globally via `config.max_sync_errors` or per CRM via `options: { max_sync_errors: N }`. Use `CrmSynchronisation#reset_error_count!` to manually re-enable sync after fixing the root cause. Run `rails g etlify:add_error_count` to generate the migration. - Feat: Add `sync_dependencies` option for dependency-based sync ordering. When a dependency has no `crm_id` yet, the sync is buffered in `etlify_pending_syncs` and automatically retried once the dependency is synced. Supports both etlified models (via `CrmSynchronisation`) and legacy models with a direct `#{crm_name}_id` column (e.g. `airtable_id`). Requires running `rails g etlify:migration create_etlify_pending_syncs && rails db:migrate`. diff --git a/lib/etlify/version.rb b/lib/etlify/version.rb index fbb834c..27f5913 100644 --- a/lib/etlify/version.rb +++ b/lib/etlify/version.rb @@ -1,3 +1,3 @@ module Etlify - VERSION = "0.9.3" + VERSION = "0.9.4" end