Skip to content

Commit 12ffc6b

Browse files
committed
Address lint
1 parent 758598c commit 12ffc6b

File tree

3 files changed

+5
-3
lines changed

3 files changed

+5
-3
lines changed

src/utils/job/jobs.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,6 @@ def execute(self, context: JobExecutionContext,
205205
Executes the job. Returns true if the job was completed successful and can
206206
be removed from the message queue, or false if the job failed.
207207
"""
208-
last_timestamp = datetime.datetime.now()
209208
postgres = context.postgres
210209

211210
# Create workflow and groups in database

src/utils/job/task.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1045,7 +1045,7 @@ class Config:
10451045
def batch_insert_to_db(
10461046
database: connectors.PostgresConnector,
10471047
task_entries: List[Tuple],
1048-
batch_size: int = 100,
1048+
batch_size: int = 2,
10491049
):
10501050
"""Batch-insert multiple tasks in a single query.
10511051
@@ -1058,6 +1058,9 @@ def batch_insert_to_db(
10581058
if not task_entries:
10591059
return
10601060

1061+
if batch_size <= 0:
1062+
batch_size = 100
1063+
10611064
for i in range(0, len(task_entries), batch_size):
10621065
chunk = task_entries[i:i + batch_size]
10631066
values_clause = ','.join(

src/utils/job/workflow.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -632,7 +632,7 @@ def validate_data(self, user: str, dataset_config: connectors.DatasetConfig,
632632
group_task: task.TaskSpec, seen_uri_input: Set[str],
633633
seen_uri_output: Set[str], disabled_data: List[str],
634634
seen_bucket_input: Set[str], seen_bucket_output: Set[str],
635-
default_user_bucket: Optional[str],
635+
default_user_bucket: str | None,
636636
default_service_bucket: str,
637637
user_creds: Dict[str, Any]):
638638

0 commit comments

Comments
 (0)