Skip to content

Commit

Permalink
records_per_metric update for postgres and webhook
Browse files Browse the repository at this point in the history
  • Loading branch information
rajvarkala committed Jun 20, 2023
1 parent 24cb7a2 commit edcfe9a
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 2 deletions.
4 changes: 4 additions & 0 deletions config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -46,4 +46,8 @@ LOGGING_CONF:
CONNECTOR_RUN_CONFIG:
FACEBOOK_ADS:
chunk_size: 9500
WEBHOOK:
records_per_metric: 100
POSTGRES:
records_per_metric: 100

7 changes: 6 additions & 1 deletion src/api/routers/syncs.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,11 +93,16 @@ async def get_current_run_details(
run_args = {
"sync_id": sync_id,
"run_id": sync_schedule.last_run_id,

"chunk_size": connector_run_config["chunk_size"]
if "chunk_size" in connector_run_config
else 300,

"chunk_id": 0,
"records_per_metric": 10,
"records_per_metric": connector_run_config["records_per_metric"]
if "records_per_metric" in connector_run_config
else 10,

"previous_run_status": "success" if previous_run is None
or ("run_manager" in previous_run.extra and previous_run.extra["run_manager"]["status"]["status"] == "success")
else "failure", # For first run also, previous_run_status will be success
Expand Down
2 changes: 1 addition & 1 deletion valmi-app-backend

0 comments on commit edcfe9a

Please sign in to comment.