vortexpy 4.0.22__tar.gz → 4.0.24__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- vortexpy-4.0.24/PKG-INFO +44 -0
- {vortexpy-4.0.22 → vortexpy-4.0.24}/pyproject.toml +5 -1
- vortexpy-4.0.24/setup.cfg +4 -0
- {vortexpy-4.0.22 → vortexpy-4.0.24}/vortex/DeferUtil.py +26 -5
- {vortexpy-4.0.22 → vortexpy-4.0.24}/vortex/Tuple.py +12 -2
- {vortexpy-4.0.22 → vortexpy-4.0.24}/vortex/__init__.py +1 -1
- {vortexpy-4.0.22 → vortexpy-4.0.24}/vortex/handler/TupleDataObservableCache.py +21 -18
- {vortexpy-4.0.22 → vortexpy-4.0.24}/vortex/handler/TupleDataObservableHandler.py +15 -6
- {vortexpy-4.0.22 → vortexpy-4.0.24}/vortex/handler/TupleDataObservableProxyHandler.py +11 -5
- {vortexpy-4.0.22 → vortexpy-4.0.24}/vortex/handler/TupleDataObserverClient.py +5 -4
- vortexpy-4.0.24/vortexpy.egg-info/PKG-INFO +44 -0
- {vortexpy-4.0.22 → vortexpy-4.0.24}/vortexpy.egg-info/SOURCES.txt +0 -1
- vortexpy-4.0.22/PKG-INFO +0 -21
- vortexpy-4.0.22/setup.cfg +0 -7
- vortexpy-4.0.22/vortexpy.egg-info/PKG-INFO +0 -21
- {vortexpy-4.0.22 → vortexpy-4.0.24}/LICENSE +0 -0
- {vortexpy-4.0.22 → vortexpy-4.0.24}/README.md +0 -0
- {vortexpy-4.0.22 → vortexpy-4.0.24}/vortex/DataWrapTuple.py +0 -0
- {vortexpy-4.0.22 → vortexpy-4.0.24}/vortex/Jsonable.py +0 -0
- {vortexpy-4.0.22 → vortexpy-4.0.24}/vortex/Payload.py +0 -0
- {vortexpy-4.0.22 → vortexpy-4.0.24}/vortex/PayloadEndpoint.py +0 -0
- {vortexpy-4.0.22 → vortexpy-4.0.24}/vortex/PayloadEndpointTest.py +0 -0
- {vortexpy-4.0.22 → vortexpy-4.0.24}/vortex/PayloadEnvelope.py +0 -0
- {vortexpy-4.0.22 → vortexpy-4.0.24}/vortex/PayloadFilterKeys.py +0 -0
- {vortexpy-4.0.22 → vortexpy-4.0.24}/vortex/PayloadIO.py +0 -0
- {vortexpy-4.0.22 → vortexpy-4.0.24}/vortex/PayloadPriority.py +0 -0
- {vortexpy-4.0.22 → vortexpy-4.0.24}/vortex/PayloadResponse.py +0 -0
- {vortexpy-4.0.22 → vortexpy-4.0.24}/vortex/PayloadResponseTest.py +0 -0
- {vortexpy-4.0.22 → vortexpy-4.0.24}/vortex/PayloadTest.py +0 -0
- {vortexpy-4.0.22 → vortexpy-4.0.24}/vortex/PerformTestActionTuple.py +0 -0
- {vortexpy-4.0.22 → vortexpy-4.0.24}/vortex/SerialiseUtil.py +0 -0
- {vortexpy-4.0.22 → vortexpy-4.0.24}/vortex/TestTuple.py +0 -0
- {vortexpy-4.0.22 → vortexpy-4.0.24}/vortex/TupleAction.py +0 -0
- {vortexpy-4.0.22 → vortexpy-4.0.24}/vortex/TupleActionVortex.py +0 -0
- {vortexpy-4.0.22 → vortexpy-4.0.24}/vortex/TupleDataForTest.py +0 -0
- {vortexpy-4.0.22 → vortexpy-4.0.24}/vortex/TuplePerfTest.py +0 -0
- {vortexpy-4.0.22 → vortexpy-4.0.24}/vortex/TuplePolymorphicTupleTypeFieldArgTest.py +0 -0
- {vortexpy-4.0.22 → vortexpy-4.0.24}/vortex/TupleRestfulTest.py +0 -0
- {vortexpy-4.0.22 → vortexpy-4.0.24}/vortex/TupleSelector.py +0 -0
- {vortexpy-4.0.22 → vortexpy-4.0.24}/vortex/TupleTest.py +0 -0
- {vortexpy-4.0.22 → vortexpy-4.0.24}/vortex/VortexABC.py +0 -0
- {vortexpy-4.0.22 → vortexpy-4.0.24}/vortex/VortexClientHttp.py +0 -0
- {vortexpy-4.0.22 → vortexpy-4.0.24}/vortex/VortexClientHttpTest.py +0 -0
- {vortexpy-4.0.22 → vortexpy-4.0.24}/vortex/VortexClientTcp.py +0 -0
- {vortexpy-4.0.22 → vortexpy-4.0.24}/vortex/VortexClientWebsocketFactory.py +0 -0
- {vortexpy-4.0.22 → vortexpy-4.0.24}/vortex/VortexConnectionABC.py +0 -0
- {vortexpy-4.0.22 → vortexpy-4.0.24}/vortex/VortexFactory.py +0 -0
- {vortexpy-4.0.22 → vortexpy-4.0.24}/vortex/VortexPayloadProtocol.py +0 -0
- {vortexpy-4.0.22 → vortexpy-4.0.24}/vortex/VortexServer.py +0 -0
- {vortexpy-4.0.22 → vortexpy-4.0.24}/vortex/VortexServerConnection.py +0 -0
- {vortexpy-4.0.22 → vortexpy-4.0.24}/vortex/VortexServerHttpResource.py +0 -0
- {vortexpy-4.0.22 → vortexpy-4.0.24}/vortex/VortexServerTcp.py +0 -0
- {vortexpy-4.0.22 → vortexpy-4.0.24}/vortex/VortexServerWebsocket.py +0 -0
- {vortexpy-4.0.22 → vortexpy-4.0.24}/vortex/VortexTcpMemoryLeakPayloadTest.py +0 -0
- {vortexpy-4.0.22 → vortexpy-4.0.24}/vortex/VortexTcpMemoryLeakRawTest.py +0 -0
- {vortexpy-4.0.22 → vortexpy-4.0.24}/vortex/VortexTest.py +0 -0
- {vortexpy-4.0.22 → vortexpy-4.0.24}/vortex/VortexUtil.py +0 -0
- {vortexpy-4.0.22 → vortexpy-4.0.24}/vortex/VortexWritePushProducer.py +0 -0
- {vortexpy-4.0.22 → vortexpy-4.0.24}/vortex/data_loader/TupleDataLiveLockManager.py +0 -0
- {vortexpy-4.0.22 → vortexpy-4.0.24}/vortex/data_loader/TupleDataLoader.py +0 -0
- {vortexpy-4.0.22 → vortexpy-4.0.24}/vortex/data_loader/TupleDataLoaderDelegate.py +0 -0
- {vortexpy-4.0.22 → vortexpy-4.0.24}/vortex/data_loader/TupleDataLoaderTupleABC.py +0 -0
- {vortexpy-4.0.22 → vortexpy-4.0.24}/vortex/data_loader/TupleDataLoaderTuples.py +0 -0
- {vortexpy-4.0.22 → vortexpy-4.0.24}/vortex/data_loader/__init__.py +0 -0
- {vortexpy-4.0.22 → vortexpy-4.0.24}/vortex/event_bus/TupleChangeEventABC.py +0 -0
- {vortexpy-4.0.22 → vortexpy-4.0.24}/vortex/event_bus/TupleChangeEventBus.py +0 -0
- {vortexpy-4.0.22 → vortexpy-4.0.24}/vortex/event_bus/TupleChangeEventBusObserverABC.py +0 -0
- {vortexpy-4.0.22 → vortexpy-4.0.24}/vortex/event_bus/__init__.py +0 -0
- {vortexpy-4.0.22 → vortexpy-4.0.24}/vortex/handler/TupleActionProcessor.py +0 -0
- {vortexpy-4.0.22 → vortexpy-4.0.24}/vortex/handler/TupleActionProcessorProxy.py +0 -0
- {vortexpy-4.0.22 → vortexpy-4.0.24}/vortex/handler/TupleActionProcessorTestHandler.py +0 -0
- {vortexpy-4.0.22 → vortexpy-4.0.24}/vortex/handler/TupleDataActionClient.py +0 -0
- {vortexpy-4.0.22 → vortexpy-4.0.24}/vortex/handler/TupleDataObservableTestHandler.py +0 -0
- {vortexpy-4.0.22 → vortexpy-4.0.24}/vortex/handler/VortexJSTupleLoaderTestHandler.py +0 -0
- {vortexpy-4.0.22 → vortexpy-4.0.24}/vortex/handler/__init__.py +0 -0
- {vortexpy-4.0.22 → vortexpy-4.0.24}/vortex/restful/GzippedDataHttpClient.py +0 -0
- {vortexpy-4.0.22 → vortexpy-4.0.24}/vortex/restful/GzippedDataHttpClientTest.py +0 -0
- {vortexpy-4.0.22 → vortexpy-4.0.24}/vortex/restful/GzippedPayloadHttpClient.py +0 -0
- {vortexpy-4.0.22 → vortexpy-4.0.24}/vortex/restful/RestfulHttpClient.py +0 -0
- {vortexpy-4.0.22 → vortexpy-4.0.24}/vortex/restful/RestfulHttpClientTest.py +0 -0
- {vortexpy-4.0.22 → vortexpy-4.0.24}/vortex/restful/RestfulResource.py +0 -0
- {vortexpy-4.0.22 → vortexpy-4.0.24}/vortex/restful/RestfulResourceTest.py +0 -0
- {vortexpy-4.0.22 → vortexpy-4.0.24}/vortex/restful/__init__.py +0 -0
- {vortexpy-4.0.22 → vortexpy-4.0.24}/vortex/rpc/RPC.py +0 -0
- {vortexpy-4.0.22 → vortexpy-4.0.24}/vortex/rpc/RPCTest.py +0 -0
- {vortexpy-4.0.22 → vortexpy-4.0.24}/vortex/rpc/__init__.py +0 -0
- {vortexpy-4.0.22 → vortexpy-4.0.24}/vortex/sqla_orm/OrmCrudHandler.py +0 -0
- {vortexpy-4.0.22 → vortexpy-4.0.24}/vortex/sqla_orm/TupleProviderForDb.py +0 -0
- {vortexpy-4.0.22 → vortexpy-4.0.24}/vortex/sqla_orm/VortexTupleJson.py +0 -0
- {vortexpy-4.0.22 → vortexpy-4.0.24}/vortex/sqla_orm/__init__.py +0 -0
- {vortexpy-4.0.22 → vortexpy-4.0.24}/vortex/storage/TupleStorageSqlite.py +0 -0
- {vortexpy-4.0.22 → vortexpy-4.0.24}/vortex/storage/__init__.py +0 -0
- {vortexpy-4.0.22 → vortexpy-4.0.24}/vortexpy.egg-info/dependency_links.txt +0 -0
- {vortexpy-4.0.22 → vortexpy-4.0.24}/vortexpy.egg-info/requires.txt +0 -0
- {vortexpy-4.0.22 → vortexpy-4.0.24}/vortexpy.egg-info/top_level.txt +0 -0
vortexpy-4.0.24/PKG-INFO
ADDED
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: vortexpy
|
|
3
|
+
Version: 4.0.24
|
|
4
|
+
Summary: Synertys observable, routable, data serialisation and transport code.
|
|
5
|
+
Author-email: Synerty <contact@synerty.com>
|
|
6
|
+
License: MIT License
|
|
7
|
+
|
|
8
|
+
Copyright (c) 2016
|
|
9
|
+
|
|
10
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
11
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
12
|
+
in the Software without restriction, including without limitation the rights
|
|
13
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
14
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
15
|
+
furnished to do so, subject to the following conditions:
|
|
16
|
+
|
|
17
|
+
The above copyright notice and this permission notice shall be included in all
|
|
18
|
+
copies or substantial portions of the Software.
|
|
19
|
+
|
|
20
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
21
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
22
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
23
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
24
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
25
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
26
|
+
SOFTWARE.
|
|
27
|
+
|
|
28
|
+
Project-URL: Homepage, https://github.com/Synerty/vortexpy
|
|
29
|
+
Project-URL: Download, https://github.com/Synerty/vortexpy/tarball/3.4.6
|
|
30
|
+
Keywords: vortex,observable,http,compressed,synerty
|
|
31
|
+
Classifier: Programming Language :: Python :: 3.5
|
|
32
|
+
License-File: LICENSE
|
|
33
|
+
Requires-Dist: SQLAlchemy>=2.0
|
|
34
|
+
Requires-Dist: GeoAlchemy2
|
|
35
|
+
Requires-Dist: txwebsocket>=1.1.0
|
|
36
|
+
Requires-Dist: autobahn[twisted]
|
|
37
|
+
Requires-Dist: vcversioner
|
|
38
|
+
Requires-Dist: six
|
|
39
|
+
Requires-Dist: pytz
|
|
40
|
+
Requires-Dist: reactivex>=4.0.4
|
|
41
|
+
Requires-Dist: ddt>=1.6.0
|
|
42
|
+
Requires-Dist: psutil
|
|
43
|
+
Requires-Dist: txhttputil>=1.2.0
|
|
44
|
+
Dynamic: license-file
|
|
@@ -2,9 +2,13 @@
|
|
|
2
2
|
requires = ["setuptools>=61.2"]
|
|
3
3
|
build-backend = "setuptools.build_meta"
|
|
4
4
|
|
|
5
|
+
[metadata]
|
|
6
|
+
license-file = "LICENSE"
|
|
7
|
+
|
|
5
8
|
[project]
|
|
6
9
|
name = "vortexpy"
|
|
7
|
-
version = "4.0.
|
|
10
|
+
version = "4.0.24"
|
|
11
|
+
license = {file = "LICENSE"}
|
|
8
12
|
authors = [{name = "Synerty", email = "contact@synerty.com"}]
|
|
9
13
|
description = "Synertys observable, routable, data serialisation and transport code."
|
|
10
14
|
keywords = [
|
|
@@ -68,17 +68,38 @@ def ensureDeferredWrap(funcToWrap):
|
|
|
68
68
|
|
|
69
69
|
|
|
70
70
|
def vortexLogFailure(failure, loggerArg, consumeError=False, successValue=True):
|
|
71
|
+
"""
|
|
72
|
+
Log a Twisted Failure instance using the provided logger.
|
|
73
|
+
|
|
74
|
+
Args:
|
|
75
|
+
failure: Twisted Failure instance to log
|
|
76
|
+
loggerArg: Logger instance to use for logging
|
|
77
|
+
consumeError: If True, returns successValue instead of the failure
|
|
78
|
+
successValue: Value to return if consumeError is True
|
|
79
|
+
|
|
80
|
+
Returns:
|
|
81
|
+
The original failure or successValue depending on consumeError
|
|
82
|
+
"""
|
|
71
83
|
try:
|
|
72
84
|
if not hasattr(failure, "_vortexFailureLogged"):
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
85
|
+
exc_info = (
|
|
86
|
+
failure.type,
|
|
87
|
+
failure.value,
|
|
88
|
+
failure.getTracebackObject(),
|
|
89
|
+
)
|
|
77
90
|
|
|
91
|
+
# Log with full exception info for better tracebacks
|
|
92
|
+
loggerArg.exception(str(failure.value), exc_info=exc_info)
|
|
93
|
+
|
|
94
|
+
# Mark as logged to prevent duplicate logging
|
|
78
95
|
failure._vortexFailureLogged = True
|
|
96
|
+
|
|
79
97
|
return successValue if consumeError else failure
|
|
98
|
+
|
|
80
99
|
except Exception as e:
|
|
81
|
-
|
|
100
|
+
# If something goes wrong in our logging logic, log that error
|
|
101
|
+
loggerArg.exception("Error while logging failure: %s", str(e))
|
|
102
|
+
return failure
|
|
82
103
|
|
|
83
104
|
|
|
84
105
|
def vortexLogAndConsumeFailure(failure, loggerArg, successValue=True):
|
|
@@ -14,7 +14,7 @@ import re
|
|
|
14
14
|
from abc import abstractmethod, ABC
|
|
15
15
|
from copy import deepcopy
|
|
16
16
|
from datetime import datetime
|
|
17
|
-
from typing import Dict, Optional, Annotated
|
|
17
|
+
from typing import Dict, Optional, Annotated, Any
|
|
18
18
|
from typing import List
|
|
19
19
|
from typing import Type
|
|
20
20
|
from typing import get_args
|
|
@@ -850,10 +850,20 @@ class Tuple(Jsonable, _TupleToPlainJsonMixin, _TupleToSqlaJsonMixin):
|
|
|
850
850
|
return False
|
|
851
851
|
return cls.__tupleType__ == other.__tupleType__
|
|
852
852
|
|
|
853
|
-
def tupleClone(self):
|
|
853
|
+
def tupleClone(self, deep=False):
|
|
854
854
|
clone = self.__class__()
|
|
855
|
+
|
|
856
|
+
def cloneVal(anyVal: Any):
|
|
857
|
+
if isinstance(anyVal, list):
|
|
858
|
+
return [cloneVal(v) for v in anyVal]
|
|
859
|
+
if isinstance(anyVal, Tuple):
|
|
860
|
+
return anyVal.tupleClone()
|
|
861
|
+
return anyVal
|
|
862
|
+
|
|
855
863
|
for name in self.__fieldNames__:
|
|
856
864
|
val = getattr(self, name)
|
|
865
|
+
if deep:
|
|
866
|
+
val = cloneVal(val)
|
|
857
867
|
if val is not None:
|
|
858
868
|
setattr(clone, name, val)
|
|
859
869
|
|
|
@@ -109,6 +109,13 @@ class TupleDataObservableCache(metaclass=ABCMeta):
|
|
|
109
109
|
def __init__(self) -> None:
|
|
110
110
|
self.__cache: Dict[str, _CachedSubscribedData] = {}
|
|
111
111
|
|
|
112
|
+
def start(self):
|
|
113
|
+
|
|
114
|
+
self.__pollLoopingCall = task.LoopingCall(self.__cacheCheck)
|
|
115
|
+
|
|
116
|
+
d = self.__pollLoopingCall.start(self.__CHECK_PERIOD, now=False)
|
|
117
|
+
d.addErrback(vortexLogFailure, logger, consumeError=True)
|
|
118
|
+
|
|
112
119
|
def shutdown(self):
|
|
113
120
|
if not self.__pollLoopingCall:
|
|
114
121
|
raise Exception("This has already been shutdown")
|
|
@@ -122,13 +129,6 @@ class TupleDataObservableCache(metaclass=ABCMeta):
|
|
|
122
129
|
|
|
123
130
|
self.__cache = {}
|
|
124
131
|
|
|
125
|
-
def start(self):
|
|
126
|
-
|
|
127
|
-
self.__pollLoopingCall = task.LoopingCall(self.__cacheCheck)
|
|
128
|
-
|
|
129
|
-
d = self.__pollLoopingCall.start(self.__CHECK_PERIOD, now=False)
|
|
130
|
-
d.addErrback(vortexLogFailure, logger, consumeError=True)
|
|
131
|
-
|
|
132
132
|
def _tupleSelectors(self) -> typing.List[TupleSelector]:
|
|
133
133
|
tupleSelectors = []
|
|
134
134
|
for key in self.__cache:
|
|
@@ -138,21 +138,24 @@ class TupleDataObservableCache(metaclass=ABCMeta):
|
|
|
138
138
|
## ----- Implement local observable
|
|
139
139
|
|
|
140
140
|
def __cacheCheck(self):
|
|
141
|
-
|
|
141
|
+
try:
|
|
142
|
+
currentVortexUuids = set(VortexFactory.getRemoteVortexUuids())
|
|
142
143
|
|
|
143
|
-
|
|
144
|
-
|
|
144
|
+
for ts, cache in list(self.__cache.items()):
|
|
145
|
+
cache.vortexUuids = cache.vortexUuids & currentVortexUuids
|
|
145
146
|
|
|
146
|
-
|
|
147
|
-
|
|
147
|
+
if cache.vortexUuids or cache.subject.observers:
|
|
148
|
+
cache.resetTearDown()
|
|
148
149
|
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
150
|
+
elif cache.isReadyForTearDown():
|
|
151
|
+
logger.debug("Cleaning cache for %s", cache.tupleSelector)
|
|
152
|
+
self._sendUnsubscribeToServer(cache.tupleSelector)
|
|
153
|
+
del self.__cache[ts]
|
|
153
154
|
|
|
154
|
-
|
|
155
|
-
|
|
155
|
+
else:
|
|
156
|
+
cache.markForTearDown()
|
|
157
|
+
except Exception as e:
|
|
158
|
+
logger.error("Looping call __cacheCheck threw exception: %s", e)
|
|
156
159
|
|
|
157
160
|
def _getCache(
|
|
158
161
|
self, tupleSelector: TupleSelector
|
|
@@ -195,6 +195,7 @@ class TupleDataObservableHandler:
|
|
|
195
195
|
sendResponse: SendVortexMsgResponseCallable,
|
|
196
196
|
**kwargs,
|
|
197
197
|
):
|
|
198
|
+
|
|
198
199
|
if not VortexFactory.isVortexUuidOnline(vortexUuid):
|
|
199
200
|
logger.debug(
|
|
200
201
|
"Vortex %s is no longer online, skipping reply", vortexUuid
|
|
@@ -215,16 +216,24 @@ class TupleDataObservableHandler:
|
|
|
215
216
|
# Handle unsubscribe
|
|
216
217
|
if payloadEnvelope.filt.get("unsubscribe"):
|
|
217
218
|
if tsStr in self._observerDataByTupleSelector:
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
219
|
+
observers = self._observerDataByTupleSelector[tsStr].observers
|
|
220
|
+
if observerDetails in observers:
|
|
221
|
+
observers.remove(observerDetails)
|
|
222
|
+
logger.debug(f"Processed unsubscribe for: {tsStr}")
|
|
223
|
+
else:
|
|
224
|
+
logger.debug(
|
|
225
|
+
"Unsubscribe called for missing subscription: %s",
|
|
226
|
+
tsStr,
|
|
221
227
|
)
|
|
222
228
|
|
|
223
|
-
except KeyError:
|
|
224
|
-
pass
|
|
225
|
-
|
|
226
229
|
if not self._observerDataByTupleSelector[tsStr].observers:
|
|
230
|
+
logger.debug(f"Last subscription unsubscribed for {tsStr}")
|
|
227
231
|
del self._observerDataByTupleSelector[tsStr]
|
|
232
|
+
else:
|
|
233
|
+
logger.debug(
|
|
234
|
+
"Unsubscribe called for non-existent tuple selector: %s",
|
|
235
|
+
tsStr,
|
|
236
|
+
)
|
|
228
237
|
|
|
229
238
|
return
|
|
230
239
|
|
|
@@ -173,10 +173,14 @@ class TupleDataObservableProxyHandler(TupleDataObservableCache):
|
|
|
173
173
|
return
|
|
174
174
|
|
|
175
175
|
cache = self._getCache(tupleSelector)
|
|
176
|
-
|
|
176
|
+
if vortexUuid in cache.vortexUuids:
|
|
177
177
|
cache.vortexUuids.remove(vortexUuid)
|
|
178
|
-
|
|
179
|
-
|
|
178
|
+
else:
|
|
179
|
+
logger.debug(
|
|
180
|
+
"VortexUuid %s not found in cache for %s",
|
|
181
|
+
vortexUuid,
|
|
182
|
+
tupleSelector.toJsonStr(),
|
|
183
|
+
)
|
|
180
184
|
|
|
181
185
|
def _handleSubscribe(
|
|
182
186
|
self,
|
|
@@ -219,14 +223,16 @@ class TupleDataObservableProxyHandler(TupleDataObservableCache):
|
|
|
219
223
|
|
|
220
224
|
def _sendRequestToServer(self, payloadEnvelope: PayloadEnvelope):
|
|
221
225
|
payloadEnvelope.filt["observerName"] = self._observerName
|
|
226
|
+
vortexMsg = payloadEnvelope.toVortexMsg()
|
|
222
227
|
d = VortexFactory.sendVortexMsg(
|
|
223
|
-
vortexMsgs=
|
|
228
|
+
vortexMsgs=vortexMsg,
|
|
224
229
|
destVortexName=self._proxyToVortexName,
|
|
225
230
|
)
|
|
226
231
|
d.addErrback(vortexLogFailure, logger, consumeError=True)
|
|
227
232
|
|
|
228
233
|
def _sendUnsubscribeToServer(self, tupleSelector: TupleSelector):
|
|
229
|
-
|
|
234
|
+
logger.debug("Sending unsubscribe for: %s", tupleSelector.name)
|
|
235
|
+
payloadEnvelope = PayloadEnvelope(filt=self._filt.copy())
|
|
230
236
|
payloadEnvelope.filt["tupleSelector"] = tupleSelector
|
|
231
237
|
payloadEnvelope.filt["unsubscribe"] = True
|
|
232
238
|
self._sendRequestToServer(payloadEnvelope)
|
|
@@ -63,9 +63,9 @@ class TupleDataObserverClient(TupleDataObservableCache):
|
|
|
63
63
|
# .subscribe(online= > self.vortexOnlineChanged())
|
|
64
64
|
#
|
|
65
65
|
# self.onDestroyEvent.subscribe(() = > isOnlineSub.unsubscribe())
|
|
66
|
-
VortexFactory.subscribeToVortexStatusChange(destVortexName).pipe(
|
|
67
|
-
lambda online: online is True
|
|
68
|
-
)
|
|
66
|
+
VortexFactory.subscribeToVortexStatusChange(destVortexName).pipe(
|
|
67
|
+
ops.filter(lambda online: online is True)
|
|
68
|
+
).subscribe(self._vortexOnlineChanged)
|
|
69
69
|
|
|
70
70
|
TupleDataObservableCache.start(self)
|
|
71
71
|
|
|
@@ -152,7 +152,8 @@ class TupleDataObserverClient(TupleDataObservableCache):
|
|
|
152
152
|
d.addErrback(vortexLogFailure, logger, consumeError=True)
|
|
153
153
|
|
|
154
154
|
def _sendUnsubscribeToServer(self, tupleSelector: TupleSelector):
|
|
155
|
-
|
|
155
|
+
logger.debug("Sending unsubscribe for: %s", tupleSelector.name)
|
|
156
|
+
payload = PayloadEnvelope(self._sendFilt.copy())
|
|
156
157
|
payload.filt["tupleSelector"] = tupleSelector
|
|
157
158
|
payload.filt["unsubscribe"] = True
|
|
158
159
|
self._sendRequestToServer(payload)
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: vortexpy
|
|
3
|
+
Version: 4.0.24
|
|
4
|
+
Summary: Synertys observable, routable, data serialisation and transport code.
|
|
5
|
+
Author-email: Synerty <contact@synerty.com>
|
|
6
|
+
License: MIT License
|
|
7
|
+
|
|
8
|
+
Copyright (c) 2016
|
|
9
|
+
|
|
10
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
11
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
12
|
+
in the Software without restriction, including without limitation the rights
|
|
13
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
14
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
15
|
+
furnished to do so, subject to the following conditions:
|
|
16
|
+
|
|
17
|
+
The above copyright notice and this permission notice shall be included in all
|
|
18
|
+
copies or substantial portions of the Software.
|
|
19
|
+
|
|
20
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
21
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
22
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
23
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
24
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
25
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
26
|
+
SOFTWARE.
|
|
27
|
+
|
|
28
|
+
Project-URL: Homepage, https://github.com/Synerty/vortexpy
|
|
29
|
+
Project-URL: Download, https://github.com/Synerty/vortexpy/tarball/3.4.6
|
|
30
|
+
Keywords: vortex,observable,http,compressed,synerty
|
|
31
|
+
Classifier: Programming Language :: Python :: 3.5
|
|
32
|
+
License-File: LICENSE
|
|
33
|
+
Requires-Dist: SQLAlchemy>=2.0
|
|
34
|
+
Requires-Dist: GeoAlchemy2
|
|
35
|
+
Requires-Dist: txwebsocket>=1.1.0
|
|
36
|
+
Requires-Dist: autobahn[twisted]
|
|
37
|
+
Requires-Dist: vcversioner
|
|
38
|
+
Requires-Dist: six
|
|
39
|
+
Requires-Dist: pytz
|
|
40
|
+
Requires-Dist: reactivex>=4.0.4
|
|
41
|
+
Requires-Dist: ddt>=1.6.0
|
|
42
|
+
Requires-Dist: psutil
|
|
43
|
+
Requires-Dist: txhttputil>=1.2.0
|
|
44
|
+
Dynamic: license-file
|
vortexpy-4.0.22/PKG-INFO
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
Metadata-Version: 2.1
|
|
2
|
-
Name: vortexpy
|
|
3
|
-
Version: 4.0.22
|
|
4
|
-
Summary: Synertys observable, routable, data serialisation and transport code.
|
|
5
|
-
Author-email: Synerty <contact@synerty.com>
|
|
6
|
-
Project-URL: Homepage, https://github.com/Synerty/vortexpy
|
|
7
|
-
Project-URL: Download, https://github.com/Synerty/vortexpy/tarball/3.4.6
|
|
8
|
-
Keywords: vortex,observable,http,compressed,synerty
|
|
9
|
-
Classifier: Programming Language :: Python :: 3.5
|
|
10
|
-
License-File: LICENSE
|
|
11
|
-
Requires-Dist: SQLAlchemy>=2.0
|
|
12
|
-
Requires-Dist: GeoAlchemy2
|
|
13
|
-
Requires-Dist: txwebsocket>=1.1.0
|
|
14
|
-
Requires-Dist: autobahn[twisted]
|
|
15
|
-
Requires-Dist: vcversioner
|
|
16
|
-
Requires-Dist: six
|
|
17
|
-
Requires-Dist: pytz
|
|
18
|
-
Requires-Dist: reactivex>=4.0.4
|
|
19
|
-
Requires-Dist: ddt>=1.6.0
|
|
20
|
-
Requires-Dist: psutil
|
|
21
|
-
Requires-Dist: txhttputil>=1.2.0
|
vortexpy-4.0.22/setup.cfg
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
Metadata-Version: 2.1
|
|
2
|
-
Name: vortexpy
|
|
3
|
-
Version: 4.0.22
|
|
4
|
-
Summary: Synertys observable, routable, data serialisation and transport code.
|
|
5
|
-
Author-email: Synerty <contact@synerty.com>
|
|
6
|
-
Project-URL: Homepage, https://github.com/Synerty/vortexpy
|
|
7
|
-
Project-URL: Download, https://github.com/Synerty/vortexpy/tarball/3.4.6
|
|
8
|
-
Keywords: vortex,observable,http,compressed,synerty
|
|
9
|
-
Classifier: Programming Language :: Python :: 3.5
|
|
10
|
-
License-File: LICENSE
|
|
11
|
-
Requires-Dist: SQLAlchemy>=2.0
|
|
12
|
-
Requires-Dist: GeoAlchemy2
|
|
13
|
-
Requires-Dist: txwebsocket>=1.1.0
|
|
14
|
-
Requires-Dist: autobahn[twisted]
|
|
15
|
-
Requires-Dist: vcversioner
|
|
16
|
-
Requires-Dist: six
|
|
17
|
-
Requires-Dist: pytz
|
|
18
|
-
Requires-Dist: reactivex>=4.0.4
|
|
19
|
-
Requires-Dist: ddt>=1.6.0
|
|
20
|
-
Requires-Dist: psutil
|
|
21
|
-
Requires-Dist: txhttputil>=1.2.0
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|