notify all

This commit is contained in:
j 2007-08-12 09:18:54 +00:00
commit b0981645e6
2 changed files with 9 additions and 1 deletions

View file

@ -207,6 +207,14 @@ class Archive(SQLObject):
def bootstrapFrontend(self):
for f in self.files:
self.notifyFrontend('add', f.md5sum)
def fillFrontend(self):
data = read_url("%s/list" % self.baseUrlFrontend)
files = simplejson.loads(data)
md5sums = [str(f['md5sum']) for f in files.values()]
for f in ArchiveFile.select(NOT(IN(ArchiveFile.q.md5sum, md5sums))):
self.notifyFrontend('add', f.md5sum)
class ArchiveFile(SQLObject):
'''