Hi Russ,
Makes sense. Thanks.
Collin
On Sunday, December 21, 2014 5:41:34 PM UTC-6, Russell Keith-Magee wrote:
>
>
> On Sun, Dec 21, 2014 at 12:55 PM, Collin Anderson > wrote:
>>
>> Hi Erik,
>>
>> If you want a nicer interface, I just ran manage.py inspecdb on one of my
Hi Russel,
> Den 22/12/2014 kl. 00.40 skrev Russell Keith-Magee :
>
> If you *do* want to do complex queries on the database cache table, the
> approach suggested by Collin is as good an approach as any. A managed table
> will give you ORM operations over an arbitrary
Hi Colin,
> Den 21/12/2014 kl. 05.55 skrev Collin Anderson :
>
> If you want a nicer interface, I just ran manage.py inspecdb on one of my
> databases and got this for the cache table. Not sure why django still does it
> by hand.
>
> class Cache(models.Model):
>
On Sun, Dec 21, 2014 at 12:55 PM, Collin Anderson
wrote:
>
> Hi Erik,
>
> If you want a nicer interface, I just ran manage.py inspecdb on one of my
> databases and got this for the cache table. Not sure why django still does
> it by hand.
>
Gather `round, children, and let
Hi Erik,
If you want a nicer interface, I just ran manage.py inspecdb on one of my
databases and got this for the cache table. Not sure why django still does
it by hand.
class Cache(models.Model):
cache_key = models.CharField(primary_key=True, max_length=255)
value = models.TextField()
> Den 18/12/2014 kl. 12.20 skrev Erik Cederstrand :
>
> Hi list,
>
> I'm using Django as a hub to synchronize data between various external
> systems. To do this, I have some long-running Django management commands that
> are started as cron jobs. To ensure that
Hi
I use fcntl.flock() from the fcntl module. I have used this method in C, Perl
and Python, works great. Happy to share code.
François
> On Dec 18, 2014, at 9:24 AM, Javier Guerra Giraldez
> wrote:
>
> On Thu, Dec 18, 2014 at 6:20 AM, Erik Cederstrand
>
On Thu, Dec 18, 2014 at 6:20 AM, Erik Cederstrand
wrote:
> I'm using Django as a hub to synchronize data between various external
> systems. To do this, I have some long-running Django management commands that
> are started as cron jobs. To ensure that only one job is
I implemented a network lock using redis, the module had some other
functionalities, but the basic lock class was:
class Lock():
"""
Regular behavior lock, works across the network, useful for
distributed processes
"""
def __init__(self, name):
self.redis =
I'm not sure that using a cache system as a lock mechanism is a good idea.
What I would do is setup a task queue (using celery and rabbitMQ) with a
single worker, that way you guarantee that only one task is running at a
time and you can queue as many as you want. Also, each task has a maximum
Hi list,
I'm using Django as a hub to synchronize data between various external systems.
To do this, I have some long-running Django management commands that are
started as cron jobs. To ensure that only one job is working on a data set at
any one time, I have implemented a locking system
11 matches
Mail list logo