projects
/
pithos
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
8b6e481
)
Refs #1171
author
Sofia Papagiannaki
<papagian@gmail.com>
Thu, 22 Sep 2011 11:37:40 +0000
(14:37 +0300)
committer
Sofia Papagiannaki
<papagian@gmail.com>
Thu, 22 Sep 2011 11:37:40 +0000
(14:37 +0300)
tools/migration
patch
|
blob
|
history
diff --git
a/tools/migration
b/tools/migration
index
44bc0b6
..
7570b75
100755
(executable)
--- a/
tools/migration
+++ b/
tools/migration
@@
-100,23
+100,12
@@
class DataMigration(Migration):
s = select([filebody.c.id, filebody.c.storedfilepath])
rp = self.conn.execute(s)
s = select([filebody.c.id, filebody.c.storedfilepath])
rp = self.conn.execute(s)
- #basepath = '/Users/butters/Downloads'
- #files = os.listdir(basepath)
- #files = [f for f in files if not os.path.isdir(os.path.join(basepath, f))]
- #i = 0
-
while True:
t = rp.fetchone()
if not t:
break
while True:
t = rp.fetchone()
if not t:
break
- name, path = t
-
- #id, path = t[0], os.path.join(basepath, files[i])
- #i+=1
- #if i == len(files):
- # break
-
- print id, path
+ id, path = t
+ print '#', id, path
hashlist = self.blocker.block_stor_file(open(path))[1]
self.mapper.map_stor(id, hashlist)
rp.close()
hashlist = self.blocker.block_stor_file(open(path))[1]
self.mapper.map_stor(id, hashlist)
rp.close()
@@
-180,7
+169,6
@@
class ObjectMigration(DataMigration):
if __name__ == "__main__":
db = ''
if __name__ == "__main__":
db = ''
- #db = 'postgresql://gss:archipelagos@62.217.112.56/pithos'
t = UserMigration(db)
t.execute()
t = UserMigration(db)
t.execute()