[Tutor] I need an 'atomic read/ write action'

Tom tavspamnofwd at googlemail.com
Mon Nov 5 04:12:22 CET 2007


Thank you for your replies.I think lockfile is a good solution.

Kent, I have python 2.2.3 running on my server (not my choice) could you
tell me which module(s) I could use to access cron. Otherwise the only other
relavent way I can access my sever is Secure Shell Access (SSH). And what
about for my desktop computer (Vista Task Scheduler looks fancy but doesn't
seem to work so well for me) which uses python 2.5?

Thanks again. - Hide quoted text -


On 05/11/2007, Kent Johnson <kent37 at tds.net> wrote:
> Tom wrote:
> > So all my ideas for how to record task x as 'done', like using shelve
> > or writing a log file etc are not sufficient because, I need an 'atomic
> > read/ write action' (I think that's the jargon).
>
> A couple of ideas:
> - Michael's file lock
> - lockfile is another way to lock files
> http://pypi.python.org/pypi/lockfile/0.1
>
> - you could put the tasks in a database that supports transactions
> - you could run the scheduler as a single cron task rather than
> opportunistically when a user makes a request.
> - you could just use cron as your scheduler directly
>
> Kent
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.python.org/pipermail/tutor/attachments/20071105/c55b7197/attachment.htm 


More information about the Tutor mailing list