You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ponymail.apache.org by hu...@apache.org on 2021/09/07 13:22:22 UTC

[incubator-ponymail-foal] 01/01: Create a streaming endpoint type

This is an automated email from the ASF dual-hosted git repository.

humbedooh pushed a commit to branch humbedooh/mbox-stream
in repository https://gitbox.apache.org/repos/asf/incubator-ponymail-foal.git

commit 56f421f17706d5d362b61cabc4811331003c932e
Author: Daniel Gruno <hu...@apache.org>
AuthorDate: Tue Sep 7 08:22:19 2021 -0500

    Create a streaming endpoint type
---
 server/plugins/server.py | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/server/plugins/server.py b/server/plugins/server.py
index ae5be2f..c03e7d3 100644
--- a/server/plugins/server.py
+++ b/server/plugins/server.py
@@ -34,6 +34,13 @@ class Endpoint:
         self.exec = executor
 
 
+class StreamingEndpoint:
+    exec: typing.Callable
+
+    def __init__(self, executor):
+        self.exec = executor
+
+
 class BaseServer:
     """Main server class, base def"""
 
@@ -44,3 +51,4 @@ class BaseServer:
     database: AsyncElasticsearch
     dbpool: asyncio.Queue
     runners: plugins.offloader.ExecutorPool
+    streamlock: asyncio.Lock