• R/O
  • HTTP
  • SSH
  • HTTPS

コミット

タグ
未設定

よく使われているワード(クリックで追加)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

allura


コミットメタ情報

リビジョンa8a2afd33f8c70336c72e212f9abb8d7d916b4e9 (tree)
日時2012-06-16 00:41:51
作者Tim Van Steenburgh <tvansteenburgh@gmai...>
コミッターCory Johns

ログメッセージ

[#4207] Also delete Forum and Ticket monitoring emails.

Signed-off-by: Tim Van Steenburgh <tvansteenburgh@gmail.com>

変更サマリ

差分

--- a/scripts/scrub-allura-data.py
+++ b/scripts/scrub-allura-data.py
@@ -52,6 +52,12 @@ def scrub_project(p, options):
5252 q['acl'] = {'$in': [ace]}
5353 counter = 0
5454 if tool_name == 'tickets':
55+ if ac.options.get('TicketMonitoringEmail'):
56+ log.info('%s options.TicketMonitoringEmail from the %s/%s '
57+ 'tool on project "%s"' % (preamble, tool_name,
58+ mount_point, p.shortname))
59+ if not options.dry_run:
60+ ac.options['TicketMonitoringEmail'] = None
5561 for tickets in utils.chunked_find(TM.Ticket, q):
5662 for t in tickets:
5763 counter += 1
@@ -96,10 +102,15 @@ def main(options):
96102 (preamble, M.EmailAddress.query.find().count()))
97103 log.info('%s email addresses from %s User documents' %
98104 (preamble, M.User.query.find().count()))
105+ log.info('%s monitoring_email addresses from %s Forum documents' %
106+ (preamble, DM.Forum.query.find({"monitoring_email":
107+ {"$nin": [None, ""]}}).count()))
108+
99109 if not options.dry_run:
100110 M.EmailAddress.query.remove()
101111 M.User.query.update({}, {"$set": {"email_addresses": []}}, multi=True)
102-
112+ DM.Forum.query.update({"monitoring_email": {"$nin": [None, ""]}},
113+ {"$set": {"monitoring_email": None}}, multi=True)
103114 return 0
104115
105116