Ejemplo n.º 1
0
    def __init__(self):
        Index.__init__(self)
        from MaKaC.user import AvatarHolder

        ah = AvatarHolder()
        for av in ah.getList():
            self.indexUser(av)
Ejemplo n.º 2
0
 def __init__(self):
     Index.__init__(self)
     from MaKaC.user import AvatarHolder
     ah = AvatarHolder()
     for av in ah.getList():
         self.indexUser(av)
Ejemplo n.º 3
0
## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.

from MaKaC.common import DBMgr
from MaKaC.user import AvatarHolder, Avatar, GroupHolder
from MaKaC.conference import CategoryManager, ConferenceHolder

ch = ConferenceHolder()
ah = AvatarHolder()
gh = GroupHolder()

print "Cleaning index..."
userIds = []

DBMgr.getInstance().startRequest()

for av in ah.getList():
    userIds.append(av.getId())

DBMgr.getInstance().endRequest()

i = 0
total = len(userIds)
for id in userIds:
    print "processed %d users on %d"%(i, total)
    i += 1
    DBMgr.getInstance().startRequest()
    av = ah.getById(id)
    av.resetLinkedTo()
    DBMgr.getInstance().endRequest()

print "Indexing groups..."
Ejemplo n.º 4
0
## along with Indico;if not, see <http://www.gnu.org/licenses/>.

from MaKaC.common import DBMgr
from MaKaC.user import AvatarHolder, Avatar, GroupHolder
from MaKaC.conference import CategoryManager, ConferenceHolder

ch = ConferenceHolder()
ah = AvatarHolder()
gh = GroupHolder()

print "Cleaning index..."
userIds = []

DBMgr.getInstance().startRequest()

for av in ah.getList():
    userIds.append(av.getId())

DBMgr.getInstance().endRequest()

i = 0
total = len(userIds)
for id in userIds:
    print "processed %d users on %d"%(i, total)
    i += 1
    DBMgr.getInstance().startRequest()
    av = ah.getById(id)
    av.resetLinkedTo()
    DBMgr.getInstance().endRequest()

print "Indexing groups..."