mdbq 3.6.2__py3-none-any.whl → 3.6.3__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.
mdbq/redis/getredis.py
CHANGED
@@ -137,6 +137,9 @@ class RedisData(object):
|
|
137
137
|
# 存入 redis ,需要先格式化为 str,避免日期变整数形式
|
138
138
|
if _df[col].dtype == 'datetime64[ns]':
|
139
139
|
_df[col] = _df[col].astype('str')
|
140
|
+
if len(_df) == 0:
|
141
|
+
print(f'{_table_name}: 写入 redis 的数据不能为空')
|
142
|
+
return pd.DataFrame()
|
140
143
|
jsondata = _df.to_json(orient='records', force_ascii=False)
|
141
144
|
self.redis_engin.set(my_key, jsondata)
|
142
145
|
self.redis_engin.expire(my_key, self.minute * 60) # 设置缓存过期时间: 分钟
|
@@ -33,10 +33,10 @@ mdbq/pbix/pbix_refresh.py,sha256=JUjKW3bNEyoMVfVfo77UhguvS5AWkixvVhDbw4_MHco,239
|
|
33
33
|
mdbq/pbix/refresh_all.py,sha256=OBT9EewSZ0aRS9vL_FflVn74d4l2G00wzHiikCC4TC0,5926
|
34
34
|
mdbq/pbix/refresh_all_old.py,sha256=_pq3WSQ728GPtEG5pfsZI2uTJhU8D6ra-htIk1JXYzw,7192
|
35
35
|
mdbq/redis/__init__.py,sha256=YtgBlVSMDphtpwYX248wGge1x-Ex_mMufz4-8W0XRmA,12
|
36
|
-
mdbq/redis/getredis.py,sha256=
|
36
|
+
mdbq/redis/getredis.py,sha256=XLAsbhYKhh1YOy89jGN-vXaFhcRzdSnqzXX1Mu_-Xjs,8792
|
37
37
|
mdbq/spider/__init__.py,sha256=RBMFXGy_jd1HXZhngB2T2XTvJqki8P_Fr-pBcwijnew,18
|
38
38
|
mdbq/spider/aikucun.py,sha256=v7VO5gtEXR6_4Q6ujbTyu1FHu7TXHcwSQ6hIO249YH0,22208
|
39
|
-
mdbq-3.6.
|
40
|
-
mdbq-3.6.
|
41
|
-
mdbq-3.6.
|
42
|
-
mdbq-3.6.
|
39
|
+
mdbq-3.6.3.dist-info/METADATA,sha256=yUAhunDIXDwSSlitsEmQagPCqX7fyXdZvSpnVOnXqes,243
|
40
|
+
mdbq-3.6.3.dist-info/WHEEL,sha256=eOLhNAGa2EW3wWl_TU484h7q1UNgy0JXjjoqKoxAAQc,92
|
41
|
+
mdbq-3.6.3.dist-info/top_level.txt,sha256=2FQ-uLnCSB-OwFiWntzmwosW3X2Xqsg0ewh1axsaylA,5
|
42
|
+
mdbq-3.6.3.dist-info/RECORD,,
|
File without changes
|
File without changes
|