Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pub/Sub ThreadScheduler should inherit from the base Scheduler ABC #7690

Merged
merged 1 commit into from
Apr 24, 2019
Merged
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion pubsub/google/cloud/pubsub_v1/subscriber/scheduler.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ def _make_default_thread_pool_executor():
return concurrent.futures.ThreadPoolExecutor(max_workers=10, **executor_kwargs)


class ThreadScheduler(object):
class ThreadScheduler(Scheduler):
"""A thread pool-based scheduler.

This scheduler is useful in typical I/O-bound message processing.
Expand Down
4 changes: 4 additions & 0 deletions pubsub/tests/unit/pubsub_v1/subscriber/test_scheduler.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,10 @@
from google.cloud.pubsub_v1.subscriber import scheduler


def test_subclasses_base_abc():
assert issubclass(scheduler.ThreadScheduler, scheduler.Scheduler)


def test_constructor_defaults():
scheduler_ = scheduler.ThreadScheduler()

Expand Down