watchmen-collector-kernel 16.6.17__py3-none-any.whl → 17.0.0__py3-none-any.whl
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.
- watchmen_collector_kernel/common/settings.py +1 -1
- watchmen_collector_kernel/model/scheduled_task.py +1 -0
- watchmen_collector_kernel/model/status.py +2 -1
- watchmen_collector_kernel/service/extract_utils.py +1 -1
- watchmen_collector_kernel/service/lock_helper.py +1 -1
- watchmen_collector_kernel/service/task_service.py +3 -6
- watchmen_collector_kernel/storage/scheduled_task_service.py +2 -0
- watchmen_collector_kernel-17.0.0.dist-info/METADATA +27 -0
- {watchmen_collector_kernel-16.6.17.dist-info → watchmen_collector_kernel-17.0.0.dist-info}/RECORD +11 -11
- watchmen_collector_kernel-16.6.17.dist-info/METADATA +0 -30
- {watchmen_collector_kernel-16.6.17.dist-info → watchmen_collector_kernel-17.0.0.dist-info}/LICENSE +0 -0
- {watchmen_collector_kernel-16.6.17.dist-info → watchmen_collector_kernel-17.0.0.dist-info}/WHEEL +0 -0
@@ -15,7 +15,7 @@ class CollectorSettings(BaseSettings):
|
|
15
15
|
S3_CONNECTOR_LOCK_TIMEOUT = 300
|
16
16
|
PARTIAL_SIZE: int = 100
|
17
17
|
COLLECTOR_CONFIG_CACHE_ENABLED: bool = True
|
18
|
-
EXCEPTION_MAX_LENGTH =
|
18
|
+
EXCEPTION_MAX_LENGTH = 5000 # character
|
19
19
|
GROUPED_TASK_DATA_SIZE_THRESHOLD = 100
|
20
20
|
TASK_PARTIAL_SIZE: int = 100
|
21
21
|
|
@@ -38,7 +38,7 @@ def build_audit_column_criteria(audit_column_name: str, start_time: datetime, en
|
|
38
38
|
return [
|
39
39
|
EntityCriteriaExpression(
|
40
40
|
left=ColumnNameLiteral(columnName=audit_column_name),
|
41
|
-
operator=EntityCriteriaOperator.
|
41
|
+
operator=EntityCriteriaOperator.GREATER_THAN,
|
42
42
|
right=start_time),
|
43
43
|
EntityCriteriaExpression(
|
44
44
|
left=ColumnNameLiteral(columnName=audit_column_name),
|
@@ -19,7 +19,7 @@ def try_lock_nowait(lock_service: CompetitiveLockService, lock: CompetitiveLock)
|
|
19
19
|
|
20
20
|
def unlock(lock_service: CompetitiveLockService, lock: CompetitiveLock) -> bool:
|
21
21
|
lock_service.delete_by_id(lock.lockId)
|
22
|
-
return True
|
22
|
+
return True # TODO check exception
|
23
23
|
|
24
24
|
|
25
25
|
def get_resource_lock(lock_id: int, resource_id: Union[str, int], tenant_id: str) -> CompetitiveLock:
|
@@ -44,12 +44,9 @@ class TaskService:
|
|
44
44
|
for raw_data in raw_data_list:
|
45
45
|
executed(task.topicCode, raw_data, task.tenantId)
|
46
46
|
|
47
|
-
def update_task_result(self, task: ScheduledTask
|
47
|
+
def update_task_result(self, task: ScheduledTask) -> ScheduledTask:
|
48
48
|
try:
|
49
49
|
self.scheduled_task_service.begin_transaction()
|
50
|
-
task.isFinished = True
|
51
|
-
task.status = status
|
52
|
-
task.result = result
|
53
50
|
self.scheduled_task_history_service.create(task)
|
54
51
|
self.scheduled_task_service.delete(task.taskId)
|
55
52
|
self.scheduled_task_service.commit_transaction()
|
@@ -60,9 +57,9 @@ class TaskService:
|
|
60
57
|
finally:
|
61
58
|
self.scheduled_task_service.close_transaction()
|
62
59
|
|
63
|
-
def finish_task(self, task: ScheduledTask
|
60
|
+
def finish_task(self, task: ScheduledTask) -> ScheduledTask:
|
64
61
|
try:
|
65
|
-
return self.update_task_result(task
|
62
|
+
return self.update_task_result(task)
|
66
63
|
except IntegrityError:
|
67
64
|
self.delete_task(task)
|
68
65
|
|
@@ -22,6 +22,7 @@ class ScheduledTaskShaper(EntityShaper):
|
|
22
22
|
'resource_id': entity.resourceId,
|
23
23
|
'topic_code': entity.topicCode,
|
24
24
|
'content': entity.content,
|
25
|
+
'change_json_ids': entity.changeJsonIds,
|
25
26
|
'model_name': entity.modelName,
|
26
27
|
'object_id': entity.objectId,
|
27
28
|
'depend_on': ArrayHelper(entity.dependOn).map(lambda x: x.to_dict()).to_list(),
|
@@ -42,6 +43,7 @@ class ScheduledTaskShaper(EntityShaper):
|
|
42
43
|
resourceId=row.get('resource_id'),
|
43
44
|
topicCode=row.get('topic_code'),
|
44
45
|
content=row.get('content'),
|
46
|
+
changeJsonIds=row.get('change_json_ids'),
|
45
47
|
modelName=row.get('model_name'),
|
46
48
|
objectId=row.get('object_id'),
|
47
49
|
dependOn=row.get('depend_on'),
|
@@ -0,0 +1,27 @@
|
|
1
|
+
Metadata-Version: 2.1
|
2
|
+
Name: watchmen-collector-kernel
|
3
|
+
Version: 17.0.0
|
4
|
+
Summary:
|
5
|
+
License: MIT
|
6
|
+
Author: botlikes
|
7
|
+
Author-email: 75356972+botlikes456@users.noreply.github.com
|
8
|
+
Requires-Python: >=3.12,<3.13
|
9
|
+
Classifier: License :: OSI Approved :: MIT License
|
10
|
+
Classifier: Programming Language :: Python :: 3
|
11
|
+
Classifier: Programming Language :: Python :: 3.12
|
12
|
+
Provides-Extra: mongodb
|
13
|
+
Provides-Extra: mssql
|
14
|
+
Provides-Extra: mysql
|
15
|
+
Provides-Extra: oracle
|
16
|
+
Provides-Extra: oss
|
17
|
+
Provides-Extra: postgresql
|
18
|
+
Provides-Extra: s3
|
19
|
+
Requires-Dist: numpy (>=1.26.4,<2.0.0)
|
20
|
+
Requires-Dist: watchmen-data-kernel (==17.0.0)
|
21
|
+
Requires-Dist: watchmen-storage-mongodb (==17.0.0) ; extra == "mongodb"
|
22
|
+
Requires-Dist: watchmen-storage-mssql (==17.0.0) ; extra == "mssql"
|
23
|
+
Requires-Dist: watchmen-storage-mysql (==17.0.0) ; extra == "mysql"
|
24
|
+
Requires-Dist: watchmen-storage-oracle (==17.0.0) ; extra == "oracle"
|
25
|
+
Requires-Dist: watchmen-storage-oss (==17.0.0) ; extra == "oss"
|
26
|
+
Requires-Dist: watchmen-storage-postgresql (==17.0.0) ; extra == "postgresql"
|
27
|
+
Requires-Dist: watchmen-storage-s3 (==17.0.0) ; extra == "s3"
|
{watchmen_collector_kernel-16.6.17.dist-info → watchmen_collector_kernel-17.0.0.dist-info}/RECORD
RENAMED
@@ -9,7 +9,7 @@ watchmen_collector_kernel/cache/table_config_cache.py,sha256=oOjyatujD-J6hFcj42h
|
|
9
9
|
watchmen_collector_kernel/common/__init__.py,sha256=KCifKsnn6NPHkUMSq2q__fL9aWg52eK35a_mIfLKYRM,627
|
10
10
|
watchmen_collector_kernel/common/constants.py,sha256=mBc0dVjMXKp2pluN2HMNcArcOWvycNzLNu7zcZO0Eao,320
|
11
11
|
watchmen_collector_kernel/common/exception.py,sha256=AY4JAL0fBP6fAkgT7bfMTABp3x3oYtvV5vdPO5jI6S4,49
|
12
|
-
watchmen_collector_kernel/common/settings.py,sha256=
|
12
|
+
watchmen_collector_kernel/common/settings.py,sha256=h5k9PDhd5QG-iDTTXLPFmVXNeaV9-eFZdiIZyfqCr_A,2012
|
13
13
|
watchmen_collector_kernel/model/__init__.py,sha256=7FUgGxozQ3TMHBllZmds7g6nQbN2H6fID8cCLED7u04,845
|
14
14
|
watchmen_collector_kernel/model/change_data_json.py,sha256=ckCj2vvDoZCWryYE8lGjJnZ_WEfynsVrL2RvmKA2IUk,530
|
15
15
|
watchmen_collector_kernel/model/change_data_json_history.py,sha256=L9ACRe5tCP5Pc5MrpAVkLHe-6EfgZsUBfnQ2BXIYu4M,99
|
@@ -20,9 +20,9 @@ watchmen_collector_kernel/model/collector_module_config.py,sha256=0knkFhBdx4gpRX
|
|
20
20
|
watchmen_collector_kernel/model/collector_table_config.py,sha256=apxZRQmLEMsVK3Z8KnAUy61LRSITDhTEs1EVNTvC-M0,3266
|
21
21
|
watchmen_collector_kernel/model/competitive_lock.py,sha256=fxDRuzZpsgrZjGeuADS3zRYqQioqWhg72Pr592U_Yvw,264
|
22
22
|
watchmen_collector_kernel/model/condition.py,sha256=I0QSsz1pP2DRKsgfjw_M7Z_seaPFfzOCvlg6Ud2Te0s,1603
|
23
|
-
watchmen_collector_kernel/model/scheduled_task.py,sha256=
|
23
|
+
watchmen_collector_kernel/model/scheduled_task.py,sha256=qQVh-EnN6eTx93LqW8IBUli5olXy7Vp8l6ejHJ4NkME,1517
|
24
24
|
watchmen_collector_kernel/model/scheduled_task_history.py,sha256=0lgWIQWN2r_HcMoLGwKxzLmaxGNtr0NZF7NaT_DeOyE,93
|
25
|
-
watchmen_collector_kernel/model/status.py,sha256=
|
25
|
+
watchmen_collector_kernel/model/status.py,sha256=7JgTF8SZJIKH0acwzJdFCAaW3O2g_dpH0wcnN6DNVjU,210
|
26
26
|
watchmen_collector_kernel/model/trigger_event.py,sha256=vERU5ebEAy_2d7Au6WAEkpszou9Svb9tnk4rjMMKEOk,479
|
27
27
|
watchmen_collector_kernel/model/trigger_model.py,sha256=LGhtT8xmeDGB1UivAiaQ9FaHYYkaIjKztRUIuyHGBes,213
|
28
28
|
watchmen_collector_kernel/model/trigger_module.py,sha256=LVhhS-tD5Gl7GLxKDmadSYJxkSJYwlKrlnl93h4-yZQ,193
|
@@ -32,12 +32,12 @@ watchmen_collector_kernel/service/criteria_builder.py,sha256=oIwIhFno3eL-UB175V_
|
|
32
32
|
watchmen_collector_kernel/service/data_capture.py,sha256=EvXPttdd_cbXiI5oInUytceLDI04nEPY1iJjGzzDsLk,3568
|
33
33
|
watchmen_collector_kernel/service/extract_source.py,sha256=n1L0rH6ykrFgDtYi8QziA2w_JigMF7hdvtQoZLfrIzo,15697
|
34
34
|
watchmen_collector_kernel/service/extract_spi.py,sha256=aNGVqHRG9PwVe9fCecDGOkJq5nrR-mbLcDn-G259OL8,728
|
35
|
-
watchmen_collector_kernel/service/extract_utils.py,sha256=
|
36
|
-
watchmen_collector_kernel/service/lock_helper.py,sha256=
|
35
|
+
watchmen_collector_kernel/service/extract_utils.py,sha256=pmeUKc9dret_mfjqbaBDJtIPjOr-xQCh7EzQ13gFUD4,2220
|
36
|
+
watchmen_collector_kernel/service/lock_helper.py,sha256=rr37IFj80OAPdP7TBhGLdmG8hSOkm_L6r6RTmJxNNbw,925
|
37
37
|
watchmen_collector_kernel/service/model_config_service.py,sha256=1tFd_MUldwl37JyRJF4FX6ywmFQ2caFYfslAlqnv2Jk,2235
|
38
38
|
watchmen_collector_kernel/service/module_config_service.py,sha256=M4Mn45WEV9rllpX4A9LhtVE7VjBo-Q9LrHnR4_U2UYA,2027
|
39
39
|
watchmen_collector_kernel/service/table_config_service.py,sha256=1jmaaOEM0ETRrTDGgGK7S9SCX85bPIP_jJ2zqsHH4DU,3962
|
40
|
-
watchmen_collector_kernel/service/task_service.py,sha256=
|
40
|
+
watchmen_collector_kernel/service/task_service.py,sha256=7bKbRmHwyWRV6cff8V9rfVlf8EXa2DidVlocuVaHGpc,4705
|
41
41
|
watchmen_collector_kernel/service/trigger_collector.py,sha256=p07SEQsfrBYIT02Ea5w9R70Yh7NAMC1TlFnn7hn79-o,10852
|
42
42
|
watchmen_collector_kernel/service/trigger_event_helper.py,sha256=l01bMQrHM-bij4_S0vdzHDuERaTZ4PFo7jQQMRw7dTc,17784
|
43
43
|
watchmen_collector_kernel/storage/__init__.py,sha256=064rAoXd3IkhPL6aVisW4BGYImKItD6h3btXsHkrBZo,1369
|
@@ -50,12 +50,12 @@ watchmen_collector_kernel/storage/collector_module_config_service.py,sha256=OB4q
|
|
50
50
|
watchmen_collector_kernel/storage/collector_table_config_service.py,sha256=PcXEgW4igoEqeTbYI8uikudRFuom4a-G9eGUAzjH9Vo,7705
|
51
51
|
watchmen_collector_kernel/storage/competitive_lock_service.py,sha256=SIXpoeRP1S88ZQJy_-iZgGV9HTJwwM5r3vJn7J9WJbU,3154
|
52
52
|
watchmen_collector_kernel/storage/scheduled_task_history_service.py,sha256=f-JXZ5G87oy7FdYPkbbfTKhI_oRm4wauWNvTw9hxGjM,1586
|
53
|
-
watchmen_collector_kernel/storage/scheduled_task_service.py,sha256=
|
53
|
+
watchmen_collector_kernel/storage/scheduled_task_service.py,sha256=KvijmGPXD1QzwKW_pqch9PYgISDtKLzIvdi6axuX4Qo,10733
|
54
54
|
watchmen_collector_kernel/storage/trigger_event_service.py,sha256=pQwfrwt6-6qkJvorO28dTR7cGuvcmvFQUMPUfTujjWg,6836
|
55
55
|
watchmen_collector_kernel/storage/trigger_model_service.py,sha256=FE_88sYzh9ibUS1bOyDmGvryfPQraqkMbZc3BKtzfpI,3760
|
56
56
|
watchmen_collector_kernel/storage/trigger_module_service.py,sha256=Ca4J8vnBzS90qP3ljwDJ7lt6MzaOushGjoFRwsSKfHI,3377
|
57
57
|
watchmen_collector_kernel/storage/trigger_table_service.py,sha256=TRAFknaX6IW8lX7dMCR4y_3yjA2bYFFH1HdwW21--Kc,3915
|
58
|
-
watchmen_collector_kernel-
|
59
|
-
watchmen_collector_kernel-
|
60
|
-
watchmen_collector_kernel-
|
61
|
-
watchmen_collector_kernel-
|
58
|
+
watchmen_collector_kernel-17.0.0.dist-info/LICENSE,sha256=iuuG7ErblOdcEZi5u89VXS0VIUiTb4flerGp_PAS9E4,1061
|
59
|
+
watchmen_collector_kernel-17.0.0.dist-info/METADATA,sha256=j-rEGiyOTIn627GS2exWRX-AfWomI4wKsuSeTlSRYTk,1075
|
60
|
+
watchmen_collector_kernel-17.0.0.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
|
61
|
+
watchmen_collector_kernel-17.0.0.dist-info/RECORD,,
|
@@ -1,30 +0,0 @@
|
|
1
|
-
Metadata-Version: 2.1
|
2
|
-
Name: watchmen-collector-kernel
|
3
|
-
Version: 16.6.17
|
4
|
-
Summary:
|
5
|
-
License: MIT
|
6
|
-
Author: botlikes
|
7
|
-
Author-email: 75356972+botlikes456@users.noreply.github.com
|
8
|
-
Requires-Python: >=3.9,<4.0
|
9
|
-
Classifier: License :: OSI Approved :: MIT License
|
10
|
-
Classifier: Programming Language :: Python :: 3
|
11
|
-
Classifier: Programming Language :: Python :: 3.9
|
12
|
-
Classifier: Programming Language :: Python :: 3.10
|
13
|
-
Classifier: Programming Language :: Python :: 3.11
|
14
|
-
Classifier: Programming Language :: Python :: 3.12
|
15
|
-
Provides-Extra: mongodb
|
16
|
-
Provides-Extra: mssql
|
17
|
-
Provides-Extra: mysql
|
18
|
-
Provides-Extra: oracle
|
19
|
-
Provides-Extra: oss
|
20
|
-
Provides-Extra: postgresql
|
21
|
-
Provides-Extra: s3
|
22
|
-
Requires-Dist: numpy (>=1.26.4,<2.0.0)
|
23
|
-
Requires-Dist: watchmen-data-kernel (==16.6.17)
|
24
|
-
Requires-Dist: watchmen-storage-mongodb (==16.6.17) ; extra == "mongodb"
|
25
|
-
Requires-Dist: watchmen-storage-mssql (==16.6.17) ; extra == "mssql"
|
26
|
-
Requires-Dist: watchmen-storage-mysql (==16.6.17) ; extra == "mysql"
|
27
|
-
Requires-Dist: watchmen-storage-oracle (==16.6.17) ; extra == "oracle"
|
28
|
-
Requires-Dist: watchmen-storage-oss (==16.6.17) ; extra == "oss"
|
29
|
-
Requires-Dist: watchmen-storage-postgresql (==16.6.17) ; extra == "postgresql"
|
30
|
-
Requires-Dist: watchmen-storage-s3 (==16.6.17) ; extra == "s3"
|
{watchmen_collector_kernel-16.6.17.dist-info → watchmen_collector_kernel-17.0.0.dist-info}/LICENSE
RENAMED
File without changes
|
{watchmen_collector_kernel-16.6.17.dist-info → watchmen_collector_kernel-17.0.0.dist-info}/WHEEL
RENAMED
File without changes
|