mdbq 4.2.24__tar.gz → 4.2.25__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.
Potentially problematic release.
This version of mdbq might be problematic. Click here for more details.
- {mdbq-4.2.24 → mdbq-4.2.25}/PKG-INFO +1 -1
- mdbq-4.2.25/mdbq/__version__.py +1 -0
- {mdbq-4.2.24 → mdbq-4.2.25}/mdbq/redis/redis_cache.py +15 -7
- {mdbq-4.2.24 → mdbq-4.2.25}/mdbq.egg-info/PKG-INFO +1 -1
- mdbq-4.2.24/mdbq/__version__.py +0 -1
- {mdbq-4.2.24 → mdbq-4.2.25}/README.txt +0 -0
- {mdbq-4.2.24 → mdbq-4.2.25}/mdbq/__init__.py +0 -0
- {mdbq-4.2.24 → mdbq-4.2.25}/mdbq/auth/__init__.py +0 -0
- {mdbq-4.2.24 → mdbq-4.2.25}/mdbq/auth/auth_backend.py +0 -0
- {mdbq-4.2.24 → mdbq-4.2.25}/mdbq/auth/crypto.py +0 -0
- {mdbq-4.2.24 → mdbq-4.2.25}/mdbq/auth/rate_limiter.py +0 -0
- {mdbq-4.2.24 → mdbq-4.2.25}/mdbq/js/__init__.py +0 -0
- {mdbq-4.2.24 → mdbq-4.2.25}/mdbq/js/jc.py +0 -0
- {mdbq-4.2.24 → mdbq-4.2.25}/mdbq/log/__init__.py +0 -0
- {mdbq-4.2.24 → mdbq-4.2.25}/mdbq/log/mylogger.py +0 -0
- {mdbq-4.2.24 → mdbq-4.2.25}/mdbq/myconf/__init__.py +0 -0
- {mdbq-4.2.24 → mdbq-4.2.25}/mdbq/myconf/myconf.py +0 -0
- {mdbq-4.2.24 → mdbq-4.2.25}/mdbq/mysql/__init__.py +0 -0
- {mdbq-4.2.24 → mdbq-4.2.25}/mdbq/mysql/deduplicator.py +0 -0
- {mdbq-4.2.24 → mdbq-4.2.25}/mdbq/mysql/mysql.py +0 -0
- {mdbq-4.2.24 → mdbq-4.2.25}/mdbq/mysql/s_query.py +0 -0
- {mdbq-4.2.24 → mdbq-4.2.25}/mdbq/mysql/unique_.py +0 -0
- {mdbq-4.2.24 → mdbq-4.2.25}/mdbq/mysql/uploader.py +0 -0
- {mdbq-4.2.24 → mdbq-4.2.25}/mdbq/other/__init__.py +0 -0
- {mdbq-4.2.24 → mdbq-4.2.25}/mdbq/other/download_sku_picture.py +0 -0
- {mdbq-4.2.24 → mdbq-4.2.25}/mdbq/other/error_handler.py +0 -0
- {mdbq-4.2.24 → mdbq-4.2.25}/mdbq/other/otk.py +0 -0
- {mdbq-4.2.24 → mdbq-4.2.25}/mdbq/other/pov_city.py +0 -0
- {mdbq-4.2.24 → mdbq-4.2.25}/mdbq/other/ua_sj.py +0 -0
- {mdbq-4.2.24 → mdbq-4.2.25}/mdbq/pbix/__init__.py +0 -0
- {mdbq-4.2.24 → mdbq-4.2.25}/mdbq/pbix/pbix_refresh.py +0 -0
- {mdbq-4.2.24 → mdbq-4.2.25}/mdbq/pbix/refresh_all.py +0 -0
- {mdbq-4.2.24 → mdbq-4.2.25}/mdbq/redis/__init__.py +0 -0
- {mdbq-4.2.24 → mdbq-4.2.25}/mdbq/redis/getredis.py +0 -0
- {mdbq-4.2.24 → mdbq-4.2.25}/mdbq/route/__init__.py +0 -0
- {mdbq-4.2.24 → mdbq-4.2.25}/mdbq/route/analytics.py +0 -0
- {mdbq-4.2.24 → mdbq-4.2.25}/mdbq/route/monitor.py +0 -0
- {mdbq-4.2.24 → mdbq-4.2.25}/mdbq/route/routes.py +0 -0
- {mdbq-4.2.24 → mdbq-4.2.25}/mdbq/selenium/__init__.py +0 -0
- {mdbq-4.2.24 → mdbq-4.2.25}/mdbq/selenium/get_driver.py +0 -0
- {mdbq-4.2.24 → mdbq-4.2.25}/mdbq/spider/__init__.py +0 -0
- {mdbq-4.2.24 → mdbq-4.2.25}/mdbq.egg-info/SOURCES.txt +0 -0
- {mdbq-4.2.24 → mdbq-4.2.25}/mdbq.egg-info/dependency_links.txt +0 -0
- {mdbq-4.2.24 → mdbq-4.2.25}/mdbq.egg-info/top_level.txt +0 -0
- {mdbq-4.2.24 → mdbq-4.2.25}/setup.cfg +0 -0
- {mdbq-4.2.24 → mdbq-4.2.25}/setup.py +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
VERSION = '4.2.25'
|
|
@@ -220,8 +220,12 @@ class CacheStatsCollector:
|
|
|
220
220
|
if not stats_data.get('enabled'):
|
|
221
221
|
return
|
|
222
222
|
|
|
223
|
-
db_name = self.config.get('db_name'
|
|
224
|
-
table_name = self.config.get('table_name'
|
|
223
|
+
db_name = self.config.get('db_name')
|
|
224
|
+
table_name = self.config.get('table_name')
|
|
225
|
+
|
|
226
|
+
# 如果没有配置数据库名和表名,不提交统计
|
|
227
|
+
if not db_name or not table_name:
|
|
228
|
+
return
|
|
225
229
|
|
|
226
230
|
try:
|
|
227
231
|
connection = self.mysql_pool.connection()
|
|
@@ -352,9 +356,9 @@ class CacheConfig:
|
|
|
352
356
|
self.cache_prefix = kwargs.get('cache_prefix', 'cache') # 缓存键前缀
|
|
353
357
|
self.enable_compression = kwargs.get('enable_compression', True)
|
|
354
358
|
|
|
355
|
-
#
|
|
356
|
-
self.db_name = kwargs.get('db_name',
|
|
357
|
-
self.table_name = kwargs.get('table_name',
|
|
359
|
+
# 数据库配置(如果不传则为 None,不会自动创建数据库)
|
|
360
|
+
self.db_name = kwargs.get('db_name', None)
|
|
361
|
+
self.table_name = kwargs.get('table_name', None)
|
|
358
362
|
|
|
359
363
|
# 智能TTL策略配置
|
|
360
364
|
self.enable_smart_ttl = kwargs.get('enable_smart_ttl', True) # 启用智能TTL
|
|
@@ -404,8 +408,8 @@ class SmartCacheSystem:
|
|
|
404
408
|
self._state = CacheSystemState.READY
|
|
405
409
|
self._ready_event.set()
|
|
406
410
|
|
|
407
|
-
# 如果启用统计且有MySQL
|
|
408
|
-
if self.config.enable_stats and self.mysql_pool:
|
|
411
|
+
# 如果启用统计且有MySQL连接和数据库配置,创建统计表
|
|
412
|
+
if self.config.enable_stats and self.mysql_pool and self.config.db_name:
|
|
409
413
|
try:
|
|
410
414
|
self._create_simple_stats_table()
|
|
411
415
|
self._state = CacheSystemState.MYSQL_READY
|
|
@@ -437,6 +441,10 @@ class SmartCacheSystem:
|
|
|
437
441
|
if not self.mysql_pool:
|
|
438
442
|
return
|
|
439
443
|
|
|
444
|
+
# 如果没有配置数据库名,不创建统计表
|
|
445
|
+
if not self.config.db_name or not self.config.table_name:
|
|
446
|
+
return
|
|
447
|
+
|
|
440
448
|
try:
|
|
441
449
|
connection = self.mysql_pool.connection()
|
|
442
450
|
with connection.cursor() as cursor:
|
mdbq-4.2.24/mdbq/__version__.py
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
VERSION = '4.2.24'
|
|
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
|