Skip to content

refactor: flatten nesting in IngestEventQueue to satisfy Credo#3515

Merged
Ziinc merged 1 commit into
Logflare:mainfrom
nelsonmestevao:ne/ingest-event-queue
May 29, 2026
Merged

refactor: flatten nesting in IngestEventQueue to satisfy Credo#3515
Ziinc merged 1 commit into
Logflare:mainfrom
nelsonmestevao:ne/ingest-event-queue

Conversation

@nelsonmestevao
Copy link
Copy Markdown
Contributor

  • Extract add_to_target_table/2 to replace inline chunking lambdas in add_to_table/3 (consolidated and sid/bid clauses).
  • Extract fetch_events_or_empty/2 from the for-loop body in fetch_events/2.
  • Extract select_to_insert/4 from do_truncate_table/3, with a zero-arity head clause replacing the inline if n == 0.

- Extract `add_to_target_table/2` to replace inline chunking lambdas in `add_to_table/3` (consolidated and sid/bid clauses).
- Extract `fetch_events_or_empty/2` from the `for`-loop body in `fetch_events/2`.
- Extract `select_to_insert/4` from `do_truncate_table/3`, with a zero-arity head clause replacing the inline `if n == 0`.
@nelsonmestevao nelsonmestevao force-pushed the ne/ingest-event-queue branch from c15c431 to 55626bb Compare May 29, 2026 11:02
@Ziinc Ziinc merged commit 7dbff25 into Logflare:main May 29, 2026
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants