def saveDB(self, data: pd.DataFrame, key): def callback(result): self.send_message(self.project_name, result, key + '_' + result[MONGODB_ID]) util.updateMongoDB(data, util.genKeyIDFunc(key), DB_NAME, COLLECTION_NAME, False, callback)
def saveDB(data: pd.DataFrame, handler=None): def callback(result): # handler.send_message(handler.project_name, result, self._date + '_' + result['_id']) pass re = util.updateMongoDB(data, util.genKeyCodeFunc(TS.HS300.KEY_NAME['code']), TS.HS300.DB_NAME, TS.HS300.COLLECTION_NAME, True, callback)
def saveDB(data: pd.DataFrame, code, handler=None): def callback(result): # handler.send_message(handler.project_name, result, self._date + '_' + result['_id']) pass re = util.updateMongoDB(data, util.genKeyCodeFunc('date'), TS.KData.DB_NAME, TS.KData.COLLECTION_D_HEAD + code, True, callback)
def saveDB(self, data: pd.DataFrame, code): util.updateMongoDB(data, util.genKeyIDFunc(code), self.DB_NAME, self.COLLECTION_NAME, False, None)