vortexpy 4.0.15__tar.gz → 4.0.18__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.15 → vortexpy-4.0.18}/PKG-INFO +1 -1
- {vortexpy-4.0.15 → vortexpy-4.0.18}/pyproject.toml +1 -1
- {vortexpy-4.0.15 → vortexpy-4.0.18}/vortex/SerialiseUtil.py +10 -3
- {vortexpy-4.0.15 → vortexpy-4.0.18}/vortex/__init__.py +1 -1
- {vortexpy-4.0.15 → vortexpy-4.0.18}/vortex/data_loader/TupleDataLiveLockManager.py +9 -5
- {vortexpy-4.0.15 → vortexpy-4.0.18}/vortexpy.egg-info/PKG-INFO +1 -1
- {vortexpy-4.0.15 → vortexpy-4.0.18}/LICENSE +0 -0
- {vortexpy-4.0.15 → vortexpy-4.0.18}/README.md +0 -0
- {vortexpy-4.0.15 → vortexpy-4.0.18}/setup.cfg +0 -0
- {vortexpy-4.0.15 → vortexpy-4.0.18}/vortex/DataWrapTuple.py +0 -0
- {vortexpy-4.0.15 → vortexpy-4.0.18}/vortex/DeferUtil.py +0 -0
- {vortexpy-4.0.15 → vortexpy-4.0.18}/vortex/Jsonable.py +0 -0
- {vortexpy-4.0.15 → vortexpy-4.0.18}/vortex/Payload.py +0 -0
- {vortexpy-4.0.15 → vortexpy-4.0.18}/vortex/PayloadEndpoint.py +0 -0
- {vortexpy-4.0.15 → vortexpy-4.0.18}/vortex/PayloadEndpointTest.py +0 -0
- {vortexpy-4.0.15 → vortexpy-4.0.18}/vortex/PayloadEnvelope.py +0 -0
- {vortexpy-4.0.15 → vortexpy-4.0.18}/vortex/PayloadFilterKeys.py +0 -0
- {vortexpy-4.0.15 → vortexpy-4.0.18}/vortex/PayloadIO.py +0 -0
- {vortexpy-4.0.15 → vortexpy-4.0.18}/vortex/PayloadPriority.py +0 -0
- {vortexpy-4.0.15 → vortexpy-4.0.18}/vortex/PayloadResponse.py +0 -0
- {vortexpy-4.0.15 → vortexpy-4.0.18}/vortex/PayloadResponseTest.py +0 -0
- {vortexpy-4.0.15 → vortexpy-4.0.18}/vortex/PayloadTest.py +0 -0
- {vortexpy-4.0.15 → vortexpy-4.0.18}/vortex/PerformTestActionTuple.py +0 -0
- {vortexpy-4.0.15 → vortexpy-4.0.18}/vortex/TestTuple.py +0 -0
- {vortexpy-4.0.15 → vortexpy-4.0.18}/vortex/Tuple.py +0 -0
- {vortexpy-4.0.15 → vortexpy-4.0.18}/vortex/TupleAction.py +0 -0
- {vortexpy-4.0.15 → vortexpy-4.0.18}/vortex/TupleActionVortex.py +0 -0
- {vortexpy-4.0.15 → vortexpy-4.0.18}/vortex/TupleDataForTest.py +0 -0
- {vortexpy-4.0.15 → vortexpy-4.0.18}/vortex/TuplePerfTest.py +0 -0
- {vortexpy-4.0.15 → vortexpy-4.0.18}/vortex/TuplePolymorphicTupleTypeFieldArgTest.py +0 -0
- {vortexpy-4.0.15 → vortexpy-4.0.18}/vortex/TupleRestfulTest.py +0 -0
- {vortexpy-4.0.15 → vortexpy-4.0.18}/vortex/TupleSelector.py +0 -0
- {vortexpy-4.0.15 → vortexpy-4.0.18}/vortex/TupleTest.py +0 -0
- {vortexpy-4.0.15 → vortexpy-4.0.18}/vortex/VortexABC.py +0 -0
- {vortexpy-4.0.15 → vortexpy-4.0.18}/vortex/VortexClientHttp.py +0 -0
- {vortexpy-4.0.15 → vortexpy-4.0.18}/vortex/VortexClientHttpTest.py +0 -0
- {vortexpy-4.0.15 → vortexpy-4.0.18}/vortex/VortexClientTcp.py +0 -0
- {vortexpy-4.0.15 → vortexpy-4.0.18}/vortex/VortexClientWebsocketFactory.py +0 -0
- {vortexpy-4.0.15 → vortexpy-4.0.18}/vortex/VortexConnectionABC.py +0 -0
- {vortexpy-4.0.15 → vortexpy-4.0.18}/vortex/VortexFactory.py +0 -0
- {vortexpy-4.0.15 → vortexpy-4.0.18}/vortex/VortexPayloadProtocol.py +0 -0
- {vortexpy-4.0.15 → vortexpy-4.0.18}/vortex/VortexServer.py +0 -0
- {vortexpy-4.0.15 → vortexpy-4.0.18}/vortex/VortexServerConnection.py +0 -0
- {vortexpy-4.0.15 → vortexpy-4.0.18}/vortex/VortexServerHttpResource.py +0 -0
- {vortexpy-4.0.15 → vortexpy-4.0.18}/vortex/VortexServerTcp.py +0 -0
- {vortexpy-4.0.15 → vortexpy-4.0.18}/vortex/VortexServerWebsocket.py +0 -0
- {vortexpy-4.0.15 → vortexpy-4.0.18}/vortex/VortexTcpMemoryLeakPayloadTest.py +0 -0
- {vortexpy-4.0.15 → vortexpy-4.0.18}/vortex/VortexTcpMemoryLeakRawTest.py +0 -0
- {vortexpy-4.0.15 → vortexpy-4.0.18}/vortex/VortexTest.py +0 -0
- {vortexpy-4.0.15 → vortexpy-4.0.18}/vortex/VortexUtil.py +0 -0
- {vortexpy-4.0.15 → vortexpy-4.0.18}/vortex/VortexWritePushProducer.py +0 -0
- {vortexpy-4.0.15 → vortexpy-4.0.18}/vortex/data_loader/TupleDataLoader.py +0 -0
- {vortexpy-4.0.15 → vortexpy-4.0.18}/vortex/data_loader/TupleDataLoaderDelegate.py +0 -0
- {vortexpy-4.0.15 → vortexpy-4.0.18}/vortex/data_loader/TupleDataLoaderTupleABC.py +0 -0
- {vortexpy-4.0.15 → vortexpy-4.0.18}/vortex/data_loader/TupleDataLoaderTuples.py +0 -0
- {vortexpy-4.0.15 → vortexpy-4.0.18}/vortex/data_loader/__init__.py +0 -0
- {vortexpy-4.0.15 → vortexpy-4.0.18}/vortex/event_bus/TupleChangeEventABC.py +0 -0
- {vortexpy-4.0.15 → vortexpy-4.0.18}/vortex/event_bus/TupleChangeEventBus.py +0 -0
- {vortexpy-4.0.15 → vortexpy-4.0.18}/vortex/event_bus/TupleChangeEventBusObserverABC.py +0 -0
- {vortexpy-4.0.15 → vortexpy-4.0.18}/vortex/event_bus/__init__.py +0 -0
- {vortexpy-4.0.15 → vortexpy-4.0.18}/vortex/handler/TupleActionProcessor.py +0 -0
- {vortexpy-4.0.15 → vortexpy-4.0.18}/vortex/handler/TupleActionProcessorProxy.py +0 -0
- {vortexpy-4.0.15 → vortexpy-4.0.18}/vortex/handler/TupleActionProcessorTestHandler.py +0 -0
- {vortexpy-4.0.15 → vortexpy-4.0.18}/vortex/handler/TupleDataActionClient.py +0 -0
- {vortexpy-4.0.15 → vortexpy-4.0.18}/vortex/handler/TupleDataObservableCache.py +0 -0
- {vortexpy-4.0.15 → vortexpy-4.0.18}/vortex/handler/TupleDataObservableHandler.py +0 -0
- {vortexpy-4.0.15 → vortexpy-4.0.18}/vortex/handler/TupleDataObservableProxyHandler.py +0 -0
- {vortexpy-4.0.15 → vortexpy-4.0.18}/vortex/handler/TupleDataObservableTestHandler.py +0 -0
- {vortexpy-4.0.15 → vortexpy-4.0.18}/vortex/handler/TupleDataObserverClient.py +0 -0
- {vortexpy-4.0.15 → vortexpy-4.0.18}/vortex/handler/VortexJSTupleLoaderTestHandler.py +0 -0
- {vortexpy-4.0.15 → vortexpy-4.0.18}/vortex/handler/__init__.py +0 -0
- {vortexpy-4.0.15 → vortexpy-4.0.18}/vortex/restful/GzippedDataHttpClient.py +0 -0
- {vortexpy-4.0.15 → vortexpy-4.0.18}/vortex/restful/GzippedDataHttpClientTest.py +0 -0
- {vortexpy-4.0.15 → vortexpy-4.0.18}/vortex/restful/GzippedPayloadHttpClient.py +0 -0
- {vortexpy-4.0.15 → vortexpy-4.0.18}/vortex/restful/RestfulHttpClient.py +0 -0
- {vortexpy-4.0.15 → vortexpy-4.0.18}/vortex/restful/RestfulHttpClientTest.py +0 -0
- {vortexpy-4.0.15 → vortexpy-4.0.18}/vortex/restful/RestfulResource.py +0 -0
- {vortexpy-4.0.15 → vortexpy-4.0.18}/vortex/restful/RestfulResourceTest.py +0 -0
- {vortexpy-4.0.15 → vortexpy-4.0.18}/vortex/restful/__init__.py +0 -0
- {vortexpy-4.0.15 → vortexpy-4.0.18}/vortex/rpc/RPC.py +0 -0
- {vortexpy-4.0.15 → vortexpy-4.0.18}/vortex/rpc/RPCTest.py +0 -0
- {vortexpy-4.0.15 → vortexpy-4.0.18}/vortex/rpc/__init__.py +0 -0
- {vortexpy-4.0.15 → vortexpy-4.0.18}/vortex/sqla_orm/OrmCrudHandler.py +0 -0
- {vortexpy-4.0.15 → vortexpy-4.0.18}/vortex/sqla_orm/TupleProviderForDb.py +0 -0
- {vortexpy-4.0.15 → vortexpy-4.0.18}/vortex/sqla_orm/VortexTupleJson.py +0 -0
- {vortexpy-4.0.15 → vortexpy-4.0.18}/vortex/sqla_orm/__init__.py +0 -0
- {vortexpy-4.0.15 → vortexpy-4.0.18}/vortex/storage/TupleStorageSqlite.py +0 -0
- {vortexpy-4.0.15 → vortexpy-4.0.18}/vortex/storage/__init__.py +0 -0
- {vortexpy-4.0.15 → vortexpy-4.0.18}/vortexpy.egg-info/SOURCES.txt +0 -0
- {vortexpy-4.0.15 → vortexpy-4.0.18}/vortexpy.egg-info/dependency_links.txt +0 -0
- {vortexpy-4.0.15 → vortexpy-4.0.18}/vortexpy.egg-info/requires.txt +0 -0
- {vortexpy-4.0.15 → vortexpy-4.0.18}/vortexpy.egg-info/top_level.txt +0 -0
|
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "vortexpy"
|
|
7
|
-
version = "4.0.
|
|
7
|
+
version = "4.0.18"
|
|
8
8
|
authors = [{name = "Synerty", email = "contact@synerty.com"}]
|
|
9
9
|
description = "Synertys observable, routable, data serialisation and transport code."
|
|
10
10
|
keywords = [
|
|
@@ -6,12 +6,14 @@
|
|
|
6
6
|
* Website : http://www.synerty.com
|
|
7
7
|
* Support : support@synerty.com
|
|
8
8
|
"""
|
|
9
|
+
|
|
9
10
|
import decimal
|
|
10
11
|
import logging
|
|
11
12
|
from base64 import b64encode, b64decode
|
|
12
13
|
from collections import defaultdict
|
|
13
14
|
from datetime import datetime, date
|
|
14
15
|
|
|
16
|
+
import pytz
|
|
15
17
|
from sqlalchemy.orm.collections import InstrumentedList
|
|
16
18
|
|
|
17
19
|
logger = logging.getLogger(__name__)
|
|
@@ -210,11 +212,16 @@ def fromStr(val: str, typeName: str):
|
|
|
210
212
|
if typeName == T_DATETIME:
|
|
211
213
|
# TODO: Check with ISO8601_JS_REGEXP
|
|
212
214
|
if len(val) == len("2017-06-06T09:40:37.097Z"):
|
|
213
|
-
return datetime.strptime(val, ISO8601_JS_FORMAT)
|
|
215
|
+
return datetime.strptime(val, ISO8601_JS_FORMAT).replace(
|
|
216
|
+
tzinfo=pytz.UTC
|
|
217
|
+
)
|
|
214
218
|
|
|
215
219
|
if len(val) <= len("2017-06-06 09:40:37.097068"):
|
|
216
|
-
logger.warning(
|
|
217
|
-
|
|
220
|
+
logger.warning(
|
|
221
|
+
"Parsing date time with no timezone: %s Setting TZ to UTC",
|
|
222
|
+
val,
|
|
223
|
+
)
|
|
224
|
+
return datetime.strptime(val, ISO8601_NOTZ).replace(tzinfo=pytz.UTC)
|
|
218
225
|
|
|
219
226
|
return datetime.strptime(val, ISO8601)
|
|
220
227
|
|
|
@@ -131,6 +131,7 @@ class _LockState:
|
|
|
131
131
|
+ self.tupleDataSelector.toJsonStr()
|
|
132
132
|
)
|
|
133
133
|
self._locked = False
|
|
134
|
+
self.lockTouched = datetime.now(pytz.UTC)
|
|
134
135
|
self.unlockedByDelegateUuid = delegateUuid
|
|
135
136
|
|
|
136
137
|
self.liveUpdateDataTuple = None
|
|
@@ -174,20 +175,23 @@ class TupleDataLiveLockManager:
|
|
|
174
175
|
|
|
175
176
|
def _checkLockExpired(self):
|
|
176
177
|
for (
|
|
177
|
-
|
|
178
|
+
tupleDataType,
|
|
178
179
|
lockStateByDataSelector,
|
|
179
180
|
) in list(self._lockStateByDataSelectorByDataTupleType.items()):
|
|
180
181
|
for (
|
|
181
182
|
tupleSelectorStr,
|
|
182
183
|
lockState,
|
|
183
184
|
) in list(lockStateByDataSelector.items()):
|
|
184
|
-
if lockState.expired:
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
185
|
+
if not lockState.expired:
|
|
186
|
+
continue
|
|
187
|
+
|
|
188
|
+
logger.info("Unlocking. Lock expired for %s", tupleSelectorStr)
|
|
189
|
+
if lockState.locked:
|
|
188
190
|
self.unlock(
|
|
189
191
|
lockState.tupleDataSelector, "_checkLockExpired"
|
|
190
192
|
)
|
|
193
|
+
else:
|
|
194
|
+
lockStateByDataSelector.pop(tupleSelectorStr, None)
|
|
191
195
|
|
|
192
196
|
def _lock(
|
|
193
197
|
self,
|
|
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
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|