createTransactionProcessor creates a new transaction processor for the reconciliation. Parameters: - reconciliation: The reconciliation object representing the current process. - progress: The current progress of the reconciliation. - reconciler: The reconciler function to apply. Returns: - *transac
(reconciliation model.Reconciliation, progress model.ReconciliationProgress, reconciler func(ctx context.Context, txns []*model.Transaction) ([]model.Match, []string))
| 430 | // Returns: |
| 431 | // - *transactionProcessor: The created transaction processor. |
| 432 | func (s *LedgerForge) createTransactionProcessor(reconciliation model.Reconciliation, progress model.ReconciliationProgress, reconciler func(ctx context.Context, txns []*model.Transaction) ([]model.Match, []string)) *transactionProcessor { |
| 433 | conf, err := config.Fetch() |
| 434 | if err != nil { |
| 435 | logrus.Errorf("Error fetching configuration: %v", err) |
| 436 | } |
| 437 | return &transactionProcessor{ |
| 438 | reconciliation: reconciliation, |
| 439 | progress: progress, |
| 440 | reconciler: reconciler, |
| 441 | datasource: s.datasource, |
| 442 | progressSaveCount: conf.Reconciliation.ProgressInterval, |
| 443 | ledgerforge: s, |
| 444 | } |
| 445 | } |
| 446 | |
| 447 | // process handles individual transaction processing, applying the reconciliation logic and recording results. |
| 448 | // It also updates internal transaction metadata asynchronously when matches are found. |
no test coverage detected