Skip to content
Create a gist now

Instantly share code, notes, and snippets.

#! /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
def _spawn():
pid = os.fork()
if pid == 0:
if __name__ == "__main__":
for i in range(0, 2):
count += 10000
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.