def gitstatus_update( collection_path ): if not os.path.exists(settings.MEDIA_BASE): raise Exception('base_dir does not exist. No Store mounted?: %s' % settings.MEDIA_BASE) if not os.path.exists(gitstatus.queue_path(settings.MEDIA_BASE)): queue = gitstatus.queue_generate( settings.MEDIA_BASE, gitolite.get_repos_orgs() ) gitstatus.queue_write(settings.MEDIA_BASE, queue) return gitstatus.update(settings.MEDIA_BASE, collection_path)
def gitstatus_update_store(): if not os.path.exists(settings.MEDIA_BASE): raise Exception('base_dir does not exist. No Store mounted?: %s' % settings.MEDIA_BASE) if not os.path.exists(gitstatus.queue_path(settings.MEDIA_BASE)): queue = gitstatus.queue_generate( settings.MEDIA_BASE, gitolite.get_repos_orgs() ) gitstatus.queue_write(settings.MEDIA_BASE, queue) return gitstatus.update_store( base_dir=settings.MEDIA_BASE, delta=60, minimum=settings.GITSTATUS_INTERVAL, )