From 70006e6cfc736a3613c8c17f30bd1ffe2c19c346 Mon Sep 17 00:00:00 2001 From: Mike McLean Date: May 11 2016 20:56:58 +0000 Subject: [PATCH 1/2] don't recycle event ids in multicalls --- diff --git a/hub/kojixmlrpc.py b/hub/kojixmlrpc.py index a3059f3..5259175 100644 --- a/hub/kojixmlrpc.py +++ b/hub/kojixmlrpc.py @@ -344,6 +344,10 @@ class ModXMLRPCRequestHandler(object): else: results.append([result]) + # subsequent calls should not recycle event ids + if hasattr(context, 'event_id'): + del context.event_id + return results def handle_request(self,req): From fccc268b4ea4d84cdadf7da265660e304e4de33b Mon Sep 17 00:00:00 2001 From: Mike McLean Date: May 11 2016 20:56:58 +0000 Subject: [PATCH 2/2] update docstring for get_event() --- diff --git a/hub/kojihub.py b/hub/kojihub.py index 32b0c28..db7b69a 100644 --- a/hub/kojihub.py +++ b/hub/kojihub.py @@ -6896,8 +6896,9 @@ def get_event(): We cache the result in context, so subsequent calls in the same transaction will get the same event. - Note that this will persist across calls in a multiCall, which is fine because - it is all one transaction. + + This cache is cleared between the individual calls in a multicall. + See: https://pagure.io/koji/pull-request/74 """ if hasattr(context, 'event_id'): return context.event_id