Skip to content

Commit

Permalink
Code Style Cleanup, and Copyright Update (#56)
Browse files Browse the repository at this point in the history
Made sure new code tends towards PEP8, and updated copyright notices.
  • Loading branch information
pfifer authored Jun 23, 2017
1 parent 1e47120 commit 1eee85c
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 14 deletions.
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

0 comments on commit 1eee85c

Please sign in to comment.