Skip to content

Commit

Permalink
Nabu batch size (#120)
Browse files Browse the repository at this point in the history
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
  • Loading branch information
C-Loftus and pre-commit-ci[bot] authored Mar 4, 2025
1 parent 5158088 commit 7c2d55c
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 1 deletion.
1 change: 1 addition & 0 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ GLEANER_THREADS=5
NABU_PROFILING=false
# log levels should be in all caps
NABU_LOG_LEVEL=INFO
NABU_BATCH_SIZE=100


# Minio
Expand Down
4 changes: 3 additions & 1 deletion userCode/lib/containers.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
import os
from pathlib import Path
from userCode.lib.types import cli_modes
from userCode.lib.env import GLEANER_IMAGE, NABU_IMAGE, NABU_PROFILING
from userCode.lib.env import GLEANER_IMAGE, NABU_BATCH_SIZE, NABU_IMAGE, NABU_PROFILING
from userCode.lib.utils import run_scheduler_docker_image


Expand Down Expand Up @@ -43,6 +43,8 @@ def run(self, args: list[str]):
if NABU_PROFILING:
args.append("--trace")

args.append(f"--upsert-batch-size={NABU_BATCH_SIZE}")

nabu_log_level = os.environ.get("NABU_LOG_LEVEL")
if nabu_log_level:
args.append(f"--log-level={nabu_log_level}")
Expand Down
1 change: 1 addition & 0 deletions userCode/lib/env.py
Original file line number Diff line number Diff line change
Expand Up @@ -110,3 +110,4 @@ def strict_env(key: str):


NABU_PROFILING = strict_env("NABU_PROFILING")
NABU_BATCH_SIZE = strict_env_int("NABU_BATCH_SIZE")

0 comments on commit 7c2d55c

Please sign in to comment.