diff options
author | Zuul <zuul@review.opendev.org> | 2021-03-10 19:41:21 +0000 |
---|---|---|
committer | Gerrit Code Review <review@openstack.org> | 2021-03-10 19:41:21 +0000 |
commit | edcc55b1e9732efe37a5a0ab0ee7dc9a80ecaf0c (patch) | |
tree | 5c1c14f47ad5587b4dea9bd8e9af6864ea94b6a9 | |
parent | 1c4da386d25889acd1f6e830dc900c97b951f6cb (diff) | |
parent | 9261c8f4a79971e5d5361dd2d0df902bdc44e394 (diff) | |
download | gear-edcc55b1e9732efe37a5a0ab0ee7dc9a80ecaf0c.tar.gz |
Merge "Move handleDisconnect into BaseClientServer"
-rw-r--r-- | gear/__init__.py | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/gear/__init__.py b/gear/__init__.py index 534f0f8..6201ad6 100644 --- a/gear/__init__.py +++ b/gear/__init__.py @@ -996,6 +996,17 @@ class BaseClientServer(object): end = time.time() self.reportTimingStats(packet.ptype, end - start) + def handleDisconnect(self, job): + """Handle a Gearman server disconnection. + + If the Gearman server is disconnected, this will be called for any + jobs currently associated with the server. + + :arg Job packet: The :py:class:`Job` that was running when the server + disconnected. + """ + return job + def reportTimingStats(self, ptype, duration): """Report processing times by packet type @@ -1699,17 +1710,6 @@ class Client(BaseClient): packet.connection.handleOptionRes(packet.getArgument(0)) task.setComplete() - def handleDisconnect(self, job): - """Handle a Gearman server disconnection. - - If the Gearman server is disconnected, this will be called for any - jobs currently associated with the server. - - :arg Job packet: The :py:class:`Job` that was running when the server - disconnected. - """ - return job - class FunctionRecord(object): """Represents a function that should be registered with Gearman. |