~sirn/fanboi2

9433842117dfb2879db1654fb993e9134a5c9199 — Kridsada Thanabulpong 4 years ago 7789db5
Actually commit sync transaction and update CHANGELOGS.
2 files changed, 6 insertions(+), 3 deletions(-)

M CHANGES.rst
M fanboi2/scripts/topic_sync.py
M CHANGES.rst => CHANGES.rst +2 -0
@@ 2,7 2,9 @@ Next
====

- [Add] Allow post filter to be configured per country.
- [Add] A ``fb2_topic_sync`` script for syncing topic's bumped timestamp.
- [Fix] CSRF check now use constant-time comparison to prevent timing attack.
- [Change] Requires minimum of 5 characters for post body.

0.10.1
------

M fanboi2/scripts/topic_sync.py => fanboi2/scripts/topic_sync.py +4 -3
@@ 1,5 1,6 @@
import os
import sys
import transaction
import sqlalchemy as sa
from fanboi2.models import DBSession, TopicMeta, Post
from pyramid.paster import bootstrap


@@ 21,7 22,7 @@ def main(argv=sys.argv):
                   limit(1)).\
                returning(TopicMeta.topic_id,
                          TopicMeta.bumped_at)
    res = DBSession.execute(query)

    for topic_id, bumped_at in res:
        print("Topic %s set bumped_at to %s" % (topic_id, bumped_at))
    with transaction.manager:
        for topic_id, bumped_at in DBSession.execute(query):
            print("Topic %s set bumped_at to %s" % (topic_id, bumped_at))