Hi Nils,

I am using Python to have 2 separate background process that:
1) Replication connections are working/ restart/ fix if needed
(including wrapper SSH tunnels).
2) Conflict resolution that is triggered by the _changes feed,
asynchronous and parallelized.

I've also used CouchDBKit to manage CouchDB from Python.

Doing the response/fix logic in a cron triggered script proved
problematic for me, so I went and added my own scheduling bits, on the
way enabling sub-minute precision quite easily, attributing to the fun
and ease of Python. (Scheduling being mostly while loops with
configurable sleep intervals, at its simplest form, and time/date
based sleeps)

Being able to suspend interval triggered execution until a previous
run came back, without having to use locking or flag files and such as
when using cron, was a breeze.

I guess that is "different" not better perhaps.

-Sivan

On Mon, Jul 26, 2010 at 11:57 PM, Nils Breunese <[email protected]> wrote:
> Python is a programming language, not a scheduler. (Although I'm sure there 
> are scheduler libraries and things like that for Python.) What do you mean by 
> 'works better than cron'? Yes, if you need sub-minute precision you'll need 
> to look elsewhere since cron doesn't support that, but otherwise I wouldn't 
> go and write code to do what a scheduler like cron already provides (and it's 
> usually already running anyway).
>
> We're actually using a Python script (using couchdbkit) run by cron for our 
> CouchDB maintenance needs.
>
> Nils.
> _nn_______________________________________
> Van: [email protected] [[email protected]] namens Sivan Greenberg 
> [[email protected]]
> Verzonden: maandag 26 juli 2010 22:26
> Aan: [email protected]
> Onderwerp: Re: scheduled tasks
>
> I am actually using python to do that in my specific project. Works
> better than cron and allows finer granularity of intervals.
>
> Sivan
>
> 2010/7/26 Nils Breunese <[email protected]>:
>> I don't think so. Until there is I guess you could use an external scheduler 
>> like cron?
>>
>> Nils.
>> ________________________________________
>> Van: Kenneth Tyler [[email protected]]
>> Verzonden: maandag 26 juli 2010 18:49
>> Aan: [email protected]
>> Onderwerp: scheduled tasks
>>
>> is there any way to run a scheduled task in couchdb?
>>
>> i'd like to create a bunch of documents that reresent data in records
>> that need to be updated... without having to do the update immediately
>>
>> thanks
>>
>> ken tyler
>>
>> De informatie vervat in deze  e-mail en meegezonden bijlagen is uitsluitend 
>> bedoeld voor gebruik door de geadresseerde en kan vertrouwelijke informatie 
>> bevatten. Openbaarmaking, vermenigvuldiging, verspreiding en/of verstrekking 
>> van deze informatie aan derden is voorbehouden aan geadresseerde. De VPRO 
>> staat niet in voor de juiste en volledige overbrenging van de inhoud van een 
>> verzonden e-mail, noch voor tijdige ontvangst daarvan.
>>
>
> De informatie vervat in deze  e-mail en meegezonden bijlagen is uitsluitend 
> bedoeld voor gebruik door de geadresseerde en kan vertrouwelijke informatie 
> bevatten. Openbaarmaking, vermenigvuldiging, verspreiding en/of verstrekking 
> van deze informatie aan derden is voorbehouden aan geadresseerde. De VPRO 
> staat niet in voor de juiste en volledige overbrenging van de inhoud van een 
> verzonden e-mail, noch voor tijdige ontvangst daarvan.
>

Reply via email to