views:

99

answers:

1

Via django iam launching a thread (via middle ware the moment the first request comes) which continously fetches the twitter public steam and puts it down into the database.Assume the thread name is twitterthread.

I also have have several cron jobs which periodically interacts with other third party api services.

Observed the following Problem:

if i don't launch twitterthread cron jobs are running fine. Where as if i launch twitterthread cron jobs are not running
Any idea on what can go wrong? and any guidelines on the way to fix it.

A: 

I'd advice to avoid launching threads inside the django application. Most of the times you can run the thread as a separate application.

If you deploy the app in a Apache server and you don't control it properly each Apache process will assume that a request is the first one and you could end up with more than one instance of twitterthread.

msalvadores