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

Code Style Cleanup, and Copyright Update #56

Merged
merged 1 commit into from
Jun 23, 2017
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
14 changes: 7 additions & 7 deletions amazon_kclpy/kcl.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 2014-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved.
# Copyright 2014-2017 Amazon.com, Inc. or its affiliates. All Rights Reserved.
#
# Licensed under the Amazon Software License (the "License").
# You may not use this file except in compliance with the License.
Expand Down Expand Up @@ -222,13 +222,13 @@ def shutdown(self, checkpointer, reason):

@abc.abstractmethod
def shutdown_requested(self, checkpointer):
'''
Called by a KCLProcess instance to indicate that this record processor is being shutdown.
And it gives an opportunity for record processor to checkpoint before shutdown.
"""
Called by a KCLProcess instance to indicate that this record processor is about to be be shutdown. This gives
the record processor a chance to checkpoint, before the lease is terminated.

:type checkpointer: amazon_kclpy.kcl.Checkpointer
:param checkpointer: A checkpointer which accepts a sequence number or no parameters.
'''
:type checkpointer: amazon_kclpy.kcl.Checkpointer
:param checkpointer: A checkpointer which accepts a sequence number or no parameters.
"""
pass

version = 1
Expand Down
3 changes: 2 additions & 1 deletion amazon_kclpy/messages.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 2014-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved.
# Copyright 2014-2017 Amazon.com, Inc. or its affiliates. All Rights Reserved.
#
# Licensed under the Amazon Software License (the "License").
# You may not use this file except in compliance with the License.
Expand Down Expand Up @@ -210,6 +210,7 @@ def dispatch(self, checkpointer, record_processor):
self._checkpointer = checkpointer
record_processor.shutdown(self)


class ShutdownRequestedInput(MessageDispatcher):
"""
Used to tell the record processor it will be shutdown.
Expand Down
13 changes: 7 additions & 6 deletions amazon_kclpy/v2/processor.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 2014-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved.
# Copyright 2014-2017 Amazon.com, Inc. or its affiliates. All Rights Reserved.
#
# Licensed under the Amazon Software License (the "License").
# You may not use this file except in compliance with the License.
Expand Down Expand Up @@ -75,12 +75,13 @@ def shutdown(self, shutdown_input):

@abc.abstractmethod
def shutdown_requested(self, shutdown_requested_input):
'''
Called by a KCLProcess instance to indicate that this record processor is being shutdown.
And it gives an opportunity for record processor to checkpoint before shutdown.
"""
Called by a KCLProcess instance to indicate that this record processor is about to be be shutdown. This gives
the record processor a chance to checkpoint, before the lease is terminated.

:param amazon_kclpy.messages.ShutdownRequestedInput shutdown_requested_input: Information related to shutdown requested.
'''
:param amazon_kclpy.messages.ShutdownRequestedInput shutdown_requested_input:
Information related to shutdown requested.
"""
pass

version = 2
Expand Down