Skip to content

Commit

Permalink
reindex things more often, why not?
Browse files Browse the repository at this point in the history
  • Loading branch information
ejucovy committed Mar 1, 2014
1 parent eac9e98 commit b4b94e9
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
5 changes: 5 additions & 0 deletions opencore/scripts/import_lists_to_project.py
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,7 @@ def main(app, zipfile, project):
moderation_bucket.add(mem_email, **cleaned_moderation_info)

imported_ids.append(ml.getId())
ml.reindexObject()

transaction.get().commit(True)

Expand Down Expand Up @@ -133,6 +134,8 @@ def main(app, zipfile, project):
importer = MailingListMessageImporter(ml)
importer.import_messages(archive)

ml.reindexObject()

memberlists = [i for i in zipfile.namelist()
if i
and len(i.split("/")) == 4
Expand Down Expand Up @@ -164,6 +167,8 @@ def main(app, zipfile, project):
importer = MailingListSubscriberImporter(ml)
importer.import_subscribers(members)

ml.reindexObject()

setSite(app.openplans)

#importer = MailingListSubscriberImporter(ml)
Expand Down
1 change: 1 addition & 0 deletions opencore/scripts/import_wiki_to_project.py
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,7 @@ def main(app, zipfile, project):

object.getField("creation_date").set(object, creation_date)
object.getField("modification_date").set(object, creation_date) # @@TODO this is getting overwritten with the current date :-(
object.setModificationDate(creation_date)

object.reindexObject()

Expand Down

0 comments on commit b4b94e9

Please sign in to comment.