diff options
author | Scott Murray <scott.murray@konsulko.com> | 2021-08-19 12:51:55 -0400 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2021-08-23 08:30:49 +0100 |
commit | 0fc3055027e2a76ac863f1c0e0d52e95748066aa (patch) | |
tree | 07737691273d84461ab266e84d8045a27f29ca86 /meta/classes/package.bbclass | |
parent | 9b1daa173481f7f560e00e0dc22b4010ff1dc0ec (diff) | |
download | openembedded-core-0fc3055027e2a76ac863f1c0e0d52e95748066aa.tar.gz |
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.
Signed-off-by: Scott Murray <scott.murray@konsulko.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes/package.bbclass')
-rw-r--r-- | meta/classes/package.bbclass | 5 |
1 files changed, 2 insertions, 3 deletions
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: |