From 3874ce6ee53e6dbb6f84ac3becb7c182e47def7a Mon Sep 17 00:00:00 2001 From: Scott Murray Date: Thu, 19 Aug 2021 12:51:55 -0400 Subject: prservice: remove connection caching This patch is a follow on of the the PR server rework in bitbake to add read-only support. The shift to using the bb.asyncrpc code in the PR server and client brings issues with respect to reuse of the same asyncio loop in different processes. This patch removes the PR service connection caching to avoid one source of this problem. It is believed that in practice this should have little impact on overall performance. (From OE-Core rev: 0fc3055027e2a76ac863f1c0e0d52e95748066aa) Signed-off-by: Scott Murray Signed-off-by: Richard Purdie --- meta/classes/package.bbclass | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'meta/classes/package.bbclass') diff --git a/meta/classes/package.bbclass b/meta/classes/package.bbclass index e17f0c797e..c4c5515d5d 100644 --- a/meta/classes/package.bbclass +++ b/meta/classes/package.bbclass @@ -714,9 +714,7 @@ python package_get_auto_pr() { return try: - conn = d.getVar("__PRSERV_CONN") - if conn is None: - conn = oe.prservice.prserv_make_conn(d) + conn = oe.prservice.prserv_make_conn(d) if conn is not None: if "AUTOINC" in pkgv: srcpv = bb.fetch2.get_srcrev(d) @@ -725,6 +723,7 @@ python package_get_auto_pr() { d.setVar("PRSERV_PV_AUTOINC", str(value)) auto_pr = conn.getPR(version, pkgarch, checksum) + conn.close() except Exception as e: bb.fatal("Can NOT get PRAUTO, exception %s" % str(e)) if auto_pr is None: -- cgit v1.2.3-54-g00ecf