|
@@ -102,21 +102,17 @@ class VideoStatusManager(object):
|
|
|
print("total", len(video_id_list))
|
|
|
print("bad_total", bad_count)
|
|
|
|
|
|
- @classmethod
|
|
|
- def closeConnection(cls):
|
|
|
- """
|
|
|
- 关闭连接
|
|
|
- :return:
|
|
|
- """
|
|
|
- cls.db_client.close()
|
|
|
+ # @classmethod
|
|
|
+ # def closeConnection(cls):
|
|
|
+ # """
|
|
|
+ # 关闭连接
|
|
|
+ # :return:
|
|
|
+ # """
|
|
|
+ # cls.db_client.close()
|
|
|
|
|
|
|
|
|
if __name__ == '__main__':
|
|
|
while True:
|
|
|
- """
|
|
|
- 每次任务重新连接数据库,处理完之后关闭数据库连接
|
|
|
- """
|
|
|
VM = VideoStatusManager()
|
|
|
VM.deal()
|
|
|
- VM.closeConnection()
|
|
|
time.sleep(10 * 60)
|