Django daemon
Hi all,
I need your suggestions regarding the following.
I have a Django app, with custom command that runs throw cron and it grabs files from some servers, those files holds data that needs to be inserted into Django models. I can't make the Django command to read the files and insert the data into the models because that could take much time, and the next cron job could have been started, which results in unsorted insertion <for example two cron jobs are inserting at the same time, Some of the records of the 1st cron will have higher PK than those in the 2nd cron and they will appear after them in the Admin interface>
What am thinking of right now, is having a daemon that checks for new files, and reads the data, adds the records to the model. But how do I access Django environment from a separate daemon??
I am not sure If that's the right way to do it anyway, so any suggestions is highly appreciated. :)
-- I am not sure If that's the right way to do it anyway, so any suggestions is highly appreciated. :)
You received this message because you are subscribed to the Google Groups "Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to django-users+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.
0 Comments:
Post a Comment
Subscribe to Post Comments [Atom]
<< Home