def handle(self, *args, **options): # Check whether it is already running or not lock = FileLock(os.path.join(settings.LOCK_ROOT, LOCK_FILE)) try: lock.acquire(0) except: print ("It seems the command is processing already.") return export_translations() lock.release()
def apply_request(request): export_translations() return redirect('db_locale_language_list')