incubator-couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sivan Greenberg <si...@omniqueue.com>
Subject Re: scheduled tasks
Date Mon, 26 Jul 2010 21:10:00 GMT
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 <N.Breunese@vpro.nl> 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: sivang@gmail.com [sivang@gmail.com] namens Sivan Greenberg [sivan@omniqueue.com]
> Verzonden: maandag 26 juli 2010 22:26
> Aan: user@couchdb.apache.org
> 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 <N.Breunese@vpro.nl>:
>> I don't think so. Until there is I guess you could use an external scheduler like
cron?
>>
>> Nils.
>> ________________________________________
>> Van: Kenneth Tyler [ken@8thfold.com]
>> Verzonden: maandag 26 juli 2010 18:49
>> Aan: user@couchdb.apache.org
>> 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.
>

Mime
View raw message