diff --git a/vas/sync_zone_moment_price.py b/vas/sync_zone_moment_price.py index bbc01c5..039c0d3 100644 --- a/vas/sync_zone_moment_price.py +++ b/vas/sync_zone_moment_price.py @@ -25,8 +25,17 @@ for m in lis: vas_moment = col_zone_moment_price.find_one({"_id": mmid}) vas_price = safe_get_int(vas_moment, "price") - if price != vas_price: - print(mmid, price, vas_price) + if price != vas_price: + q = { + "_id": mmid, + } + up = { + "$set": { + "price": price + } + } + ret = col_zone_moment_price.update_one(q, up) + print(mmid, price, vas_price, ret.modified_count) col_zone_moment.close() col_zone_moment_price.close()