From 332e57006dfdbc813353722e1b4349a63c6a9886 Mon Sep 17 00:00:00 2001

From: =?UTF-8?q?Jaakko=20Kera=CC=88nen?= jaakko.keranen@iki.fi

Date: Sat, 17 Jun 2023 10:51:25 +0300

Subject: [PATCH 1/1] Restored previous shutdown_event API


gmcapsule/gemini.py | 27 +++++++++------------------

1 file changed, 9 insertions(+), 18 deletions(-)

diff --git a/gmcapsule/gemini.py b/gmcapsule/gemini.py

index e80183e..e818a82 100644

--- a/gmcapsule/gemini.py

+++ b/gmcapsule/gemini.py

@@ -441,8 +441,9 @@ class Context:

              response_queues=None):

     self.cfg = cfg

     self.is_quiet = True

     self.allow_extension_workers = allow_extension_workers

     self.hostnames = cfg.hostnames()

     self.entrypoints = {'gemini': {}, 'titan': {}}

     for proto in ['gemini', 'titan']:

@@ -468,24 +469,16 @@ class Context:

     """

     return self.allow_extension_workers

     """

     """

     if not self.is_background_work_allowed():

         raise Exception("background work not allowed")

     # This is used in a parser thread that is allowed to launch workers.

 def set_quiet(self, is_quiet):

     self.is_quiet = is_quiet

@@ -844,9 +837,7 @@ class Server:

     self.context.set_session_id(session_id)

     # Spawn the worker threads.

     self.parser_queue = queue.Queue()

     self.handler_queue = mp.Queue()

     self.init_parser_context()

     self.parsers = []

@@ -955,7 +946,7 @@ class Server:

     print(len(self.parsers), 'parser(s) and', len(self.handlers), 'handler(s) started')

 def stop_workers(self):

     # Stop parsers first so all ongoing handler processes get to finish, and no new

     # requests can come in.

@@ -972,4 +963,4 @@ class Server:

     print(len(self.parsers), 'parser(s) and', len(self.handlers), 'handler(s) stopped')

     self.parsers = []

     self.handlers = []

--

2.25.1

Proxy Information
Original URL
gemini://git.skyjake.fi/gmcapsule/gsorg-style/patch/332e57006dfdbc813353722e1b4349a63c6a9886.patch
Status Code
Success (20)
Meta
text/plain
Capsule Response Time
26.739657 milliseconds
Gemini-to-HTML Time
1.005391 milliseconds

This content has been proxied by September (3851b).