Skip to content

Commit

Permalink
cloud_pubsub_max_messages
Browse files Browse the repository at this point in the history
  • Loading branch information
roticagas committed Jan 14, 2019
1 parent 45136d9 commit a14d878
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 2 additions & 1 deletion PubSubRunner/runner_application.py
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,8 @@ def run(self, job=None, internal_server=True):
CloudUtil.subscribe_message(self.config.cloud_project,
self.config.cloud_pubsub_subscribe_subscription,
self.subscribe_processing,
self.config.cloud_pubsub_max_lease_duration)
self.config.cloud_pubsub_max_lease_duration,
self.config.cloud_pubsub_max_messages)
if job is not None and callable(job):
job()
if internal_server:
Expand Down
2 changes: 2 additions & 0 deletions PubSubRunner/runner_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ class RunnerConfig:
('CLOUD_PUBSUB_CHECK', 'true'),
('CLOUD_PUBSUB_ACK', 'true'),
('CLOUD_PUBSUB_DEAD_LETTER_ACK', 'false'),
('CLOUD_PUBSUB_MAX_MESSAGES', '10'),
]

def __init__(self):
Expand All @@ -29,3 +30,4 @@ def __init__(self):
self.cloud_pubsub_check = env[8] in ['True', 'true', 'TRUE']
self.cloud_pubsub_ack = env[9] in ['True', 'true', 'TRUE']
self.cloud_pubsub_dead_letter_ack = env[10] in ['True', 'true', 'TRUE']
self.cloud_pubsub_max_messages = env[11]

0 comments on commit a14d878

Please sign in to comment.