Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(3)  |  Call(2)  |  Derive(0)  |  Import(1)
Lock access to a file using atomic property of link(2).

src/d/j/django-notification-1.1.1/notification/engine.py   django-notification(Download)
from django.contrib.sites.models import Site
 
from notification.lockfile import FileLock, AlreadyLocked, LockTimeout
from notification.models import NoticeQueueBatch
from notification.signals import emitted_notices
def send_all(*args):
    if len(args) == 1:
        lock = FileLock(args[0])
    else:
        lock = FileLock("send_notices")