Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions cassandra/cluster.py
Original file line number Diff line number Diff line change
Expand Up @@ -3482,6 +3482,11 @@
if wait_time is not None and wait_time <= 0:
raise ValueError("wait_time must be greater than 0")

if scope not in (SchemaAgreementScope.RACK, SchemaAgreementScope.DC, SchemaAgreementScope.CLUSTER):
raise ValueError(
"scope must be SchemaAgreementScope.RACK, .DC, or .CLUSTER"
)

total_timeout = wait_time if wait_time is not None else self.cluster.max_schema_agreement_wait
if total_timeout <= 0:
raise ValueError("total_timeout must be greater than 0")
Expand Down Expand Up @@ -4612,7 +4617,7 @@
self._scheduled_tasks.discard(task)
fn, args, kwargs = task
kwargs = dict(kwargs)
future = self._executor.submit(fn, *args, **kwargs)

Check failure on line 4620 in cassandra/cluster.py

View workflow job for this annotation

GitHub Actions / test libev (3.12)

cannot schedule new futures after shutdown

Check failure on line 4620 in cassandra/cluster.py

View workflow job for this annotation

GitHub Actions / test libev (3.12)

cannot schedule new futures after shutdown
future.add_done_callback(self._log_if_failed)
else:
self._queue.put_nowait((run_at, i, task))
Expand Down
Loading