mdbq 3.12.5__tar.gz → 3.12.7__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.
Files changed (36) hide show
  1. {mdbq-3.12.5 → mdbq-3.12.7}/PKG-INFO +1 -1
  2. mdbq-3.12.7/mdbq/__version__.py +1 -0
  3. {mdbq-3.12.5 → mdbq-3.12.7}/mdbq/mysql/deduplicator.py +1 -1
  4. {mdbq-3.12.5 → mdbq-3.12.7}/mdbq/mysql/uploader.py +7 -1
  5. {mdbq-3.12.5 → mdbq-3.12.7}/mdbq.egg-info/PKG-INFO +1 -1
  6. mdbq-3.12.5/mdbq/__version__.py +0 -1
  7. {mdbq-3.12.5 → mdbq-3.12.7}/README.txt +0 -0
  8. {mdbq-3.12.5 → mdbq-3.12.7}/mdbq/__init__.py +0 -0
  9. {mdbq-3.12.5 → mdbq-3.12.7}/mdbq/aggregation/__init__.py +0 -0
  10. {mdbq-3.12.5 → mdbq-3.12.7}/mdbq/aggregation/query_data.py +0 -0
  11. {mdbq-3.12.5 → mdbq-3.12.7}/mdbq/config/__init__.py +0 -0
  12. {mdbq-3.12.5 → mdbq-3.12.7}/mdbq/config/config.py +0 -0
  13. {mdbq-3.12.5 → mdbq-3.12.7}/mdbq/log/__init__.py +0 -0
  14. {mdbq-3.12.5 → mdbq-3.12.7}/mdbq/log/mylogger.py +0 -0
  15. {mdbq-3.12.5 → mdbq-3.12.7}/mdbq/log/spider_logging.py +0 -0
  16. {mdbq-3.12.5 → mdbq-3.12.7}/mdbq/mysql/__init__.py +0 -0
  17. {mdbq-3.12.5 → mdbq-3.12.7}/mdbq/mysql/mysql.py +0 -0
  18. {mdbq-3.12.5 → mdbq-3.12.7}/mdbq/mysql/s_query.py +0 -0
  19. {mdbq-3.12.5 → mdbq-3.12.7}/mdbq/mysql/unique_.py +0 -0
  20. {mdbq-3.12.5 → mdbq-3.12.7}/mdbq/other/__init__.py +0 -0
  21. {mdbq-3.12.5 → mdbq-3.12.7}/mdbq/other/download_sku_picture.py +0 -0
  22. {mdbq-3.12.5 → mdbq-3.12.7}/mdbq/other/otk.py +0 -0
  23. {mdbq-3.12.5 → mdbq-3.12.7}/mdbq/other/pov_city.py +0 -0
  24. {mdbq-3.12.5 → mdbq-3.12.7}/mdbq/other/ua_sj.py +0 -0
  25. {mdbq-3.12.5 → mdbq-3.12.7}/mdbq/pbix/__init__.py +0 -0
  26. {mdbq-3.12.5 → mdbq-3.12.7}/mdbq/pbix/pbix_refresh.py +0 -0
  27. {mdbq-3.12.5 → mdbq-3.12.7}/mdbq/pbix/refresh_all.py +0 -0
  28. {mdbq-3.12.5 → mdbq-3.12.7}/mdbq/redis/__init__.py +0 -0
  29. {mdbq-3.12.5 → mdbq-3.12.7}/mdbq/redis/getredis.py +0 -0
  30. {mdbq-3.12.5 → mdbq-3.12.7}/mdbq/spider/__init__.py +0 -0
  31. {mdbq-3.12.5 → mdbq-3.12.7}/mdbq/spider/aikucun.py +0 -0
  32. {mdbq-3.12.5 → mdbq-3.12.7}/mdbq.egg-info/SOURCES.txt +0 -0
  33. {mdbq-3.12.5 → mdbq-3.12.7}/mdbq.egg-info/dependency_links.txt +0 -0
  34. {mdbq-3.12.5 → mdbq-3.12.7}/mdbq.egg-info/top_level.txt +0 -0
  35. {mdbq-3.12.5 → mdbq-3.12.7}/setup.cfg +0 -0
  36. {mdbq-3.12.5 → mdbq-3.12.7}/setup.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.2
2
2
  Name: mdbq
3
- Version: 3.12.5
3
+ Version: 3.12.7
4
4
  Home-page: https://pypi.org/project/mdbq
5
5
  Author: xigua,
6
6
  Author-email: 2587125111@qq.com
@@ -0,0 +1 @@
1
+ VERSION = '3.12.7'
@@ -19,7 +19,7 @@ from contextlib import contextmanager
19
19
  warnings.filterwarnings('ignore')
20
20
  logger = mylogger.MyLogger(
21
21
  name='deduplicator',
22
- logging_mode='both',
22
+ logging_mode='file',
23
23
  log_level='info',
24
24
  log_file='deduplicator.log',
25
25
  log_format='json',
@@ -974,11 +974,17 @@ class MySQLUploader:
974
974
  :raises: 可能抛出各种验证和数据库相关异常
975
975
  """
976
976
  # upload_start = time.time()
977
- initial_row_count = len(data) if hasattr(data, '__len__') else 1
977
+ if isinstance(data, list) or (hasattr(data, 'shape') and hasattr(data, '__len__')):
978
+ initial_row_count = len(data)
979
+ else:
980
+ initial_row_count = 1
978
981
 
979
982
  batch_id = f"batch_{int(time.time() * 1000)}"
980
983
  success_flag = False
981
984
  dropped_rows = 0
985
+ total_inserted = 0
986
+ total_skipped = 0
987
+ total_failed = 0
982
988
 
983
989
  logger.info("开始上传", {
984
990
  '库': db_name,
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.2
2
2
  Name: mdbq
3
- Version: 3.12.5
3
+ Version: 3.12.7
4
4
  Home-page: https://pypi.org/project/mdbq
5
5
  Author: xigua,
6
6
  Author-email: 2587125111@qq.com
@@ -1 +0,0 @@
1
- VERSION = '3.12.5'
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