We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 29a83d3 commit 5b6b153Copy full SHA for 5b6b153
1 file changed
post_tuits.py
@@ -42,10 +42,10 @@ def get_one_document():
42
create_tweet(random_item[0], x_client, x_api)
43
44
# Update the document to set "publicado" to True and +1 to "enviado"
45
- # collection.update_one(
46
- # {"_id": random_item[0]["_id"]},
47
- # {"$set": {"publicado": True}, "$inc": {"enviado": 1}},
48
- # )
+ collection.update_one(
+ {"_id": random_item[0]["_id"]},
+ {"$set": {"publicado": True}, "$inc": {"enviado": 1}},
+ )
49
logging.info(f"id/_id:{random_item[0]["id"]}/{random_item[0]["_id"]}")
50
return random_item[0]
51
# If publicado is True, loop again to get another random item
0 commit comments