Skip to content

Embed URL

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
testgridfs
#! /usr/bin/env python
import pymongo
import gridfs
import os
count = 0
def _testgridfs():
conn = pymongo.Connection()
db = conn.test
fs = gridfs.GridFS(db)
for i in range(0, 100):
filename = str(count + i) + ".flv"
data = str(count + i)
fs.put(data, filename=filename)
print "inserted " + filename
conn.close()
def _spawn():
pid = os.fork()
if pid == 0:
_testgridfs()
exit(0)
if __name__ == "__main__":
for i in range(0, 2):
count += 10000
_spawn()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.