diff -Nru landscape-server-23.10+2.1/debian/changelog landscape-server-23.10+2.2/debian/changelog --- landscape-server-23.10+2.1/debian/changelog 2024-01-09 23:46:51.000000000 +0000 +++ landscape-server-23.10+2.2/debian/changelog 2024-04-17 18:37:38.000000000 +0000 @@ -1,3 +1,10 @@ +landscape-server (23.10+2.2-0landscape0) UNRELEASED; urgency=medium + + * d/p/0001-move-onus-of-polling-to-front-end-in-old-UI.patch + Closes: LP #2043035 + + -- Nicolas Bock Wed, 17 Apr 2024 18:37:38 +0000 + landscape-server (23.10+2.1-0landscape0) focal; urgency=medium * Release 23.10+2 stable. diff -Nru landscape-server-23.10+2.1/debian/patches/0001-move-onus-of-polling-to-front-end-in-old-UI.patch landscape-server-23.10+2.2/debian/patches/0001-move-onus-of-polling-to-front-end-in-old-UI.patch --- landscape-server-23.10+2.1/debian/patches/0001-move-onus-of-polling-to-front-end-in-old-UI.patch 1970-01-01 00:00:00.000000000 +0000 +++ landscape-server-23.10+2.2/debian/patches/0001-move-onus-of-polling-to-front-end-in-old-UI.patch 2024-04-17 18:35:40.000000000 +0000 @@ -0,0 +1,62 @@ +From 04fa246efe3c28ecf746f4018571a0c7cc4f32e5 Mon Sep 17 00:00:00 2001 +From: Mitch Burton +Date: Tue, 16 Apr 2024 15:44:50 -0700 +Subject: [PATCH] move onus of polling to front-end in old UI + +(cherry picked from commit 6f8dbda4aab457cd3f0e716d8665528abfd8b228) +--- + canonical/txlongpoll/frontend.py | 14 +++++--------- + 1 file changed, 5 insertions(+), 9 deletions(-) + +Index: landscape-server-23.10+2.1/src/landscape/canonical/txlongpoll/frontend.py +=================================================================== +--- landscape-server-23.10+2.1.orig/src/landscape/canonical/txlongpoll/frontend.py ++++ landscape-server-23.10+2.1/src/landscape/canonical/txlongpoll/frontend.py +@@ -1,4 +1,4 @@ +-# Copyright 2005-2011 Canonical Ltd. This software is licensed under the ++# Copyright 2005-2024 Canonical Ltd. This software is licensed under the + # GNU Affero General Public License version 3 (see the file LICENSE). + + """ +@@ -17,7 +17,6 @@ from twisted.web.http import ( + BAD_REQUEST, + INTERNAL_SERVER_ERROR, + NOT_FOUND, +- REQUEST_TIMEOUT, + ) + from twisted.web.resource import Resource + from twisted.web.server import NOT_DONE_YET +@@ -37,21 +36,18 @@ class NotFound(Exception): + """Exception raised when a queue is not found in the message server.""" + + +-class QueueManager(object): ++class QueueManager: + """ + An AMQP consumer which handles messages sent over a "frontend" queue to + set up temporary queues. The L{get_message} method should be invoked to + retrieve one single message from those temporary queues. + +- @ivar message_timeout: time to wait for a message before giving up in +- C{get_message}. + @ivar _channel: reference to the current C{AMQChannel}. + @ivar _client: reference to the current C{AMQClient}. + """ + +- # The timeout must be lower than the Apache one in front, which by default +- # is 5 minutes. +- message_timeout = 270 ++ # Time in seconds to wait for rabbit to respond with a new message. ++ message_timeout = 5 + + def __init__(self, prefix=None): + self._prefix = prefix +@@ -267,7 +263,7 @@ class FrontEndAjax(Resource): + return + + if error.check(Empty): +- request.setResponseCode(REQUEST_TIMEOUT) ++ pass + elif error.check(NotFound): + request.setResponseCode(NOT_FOUND) + else: diff -Nru landscape-server-23.10+2.1/debian/patches/series landscape-server-23.10+2.2/debian/patches/series --- landscape-server-23.10+2.1/debian/patches/series 1970-01-01 00:00:00.000000000 +0000 +++ landscape-server-23.10+2.2/debian/patches/series 2024-04-17 18:34:51.000000000 +0000 @@ -0,0 +1 @@ +0001-move-onus-of-polling-to-front-end-in-old-UI.patch