Hi
I'm currently playing around trying to make something akin to
TorrentFlux, using Django. TorrentFlux is a system that's PHP and it
calls shell scripts to download torrents in the background, with a web
interface to control them. For every torrent download, a new process
is started, which runs with the torrent - downloading and seeding it.
My system is similar, and i'm at a very proof of concept stage at the
moment. However, I've hit a problem. I can't find a nice way to spawn
the processes, without Django hanging as long as the process needs
(and for 600mb torrents, that's gonna be hours, and endless if seeding
is expected).
At the moment I am doing:
def start(request):
p = os.spawnlp(os.P_NOWAIT, 'python', 'python', '/Users/acid/Work/
dTorrent/btdownloadheadless',
'/Users/acid/Desktop/Inbox/-{mininova.org}- Professional C+
+.torrent')
t = Torrent.objects.create(pid=p)
return HttpResponse(str(p))
But this is hanging, despite the P_NOWAIT (the Torrent model does get
created).
Any ideas?
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---