This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
while True: | |
if result.job_status in ['started', 'queued']: | |
sleep(result.sleep) | |
continue | |
elif result.vehicle_status == 'ok': | |
process_violation(result.violations) | |
break | |
elif result.vehicle_status == 'error': | |
# vehicle info error | |
break |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from functools import wraps | |
import threading | |
import types | |
lock = threading.Lock() | |
def method_lock(f): | |
@wraps(f) | |
def decorator(*args, **kwargs): | |
lock.acquire() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python | |
# -*- coding: utf-8 -*- | |
import fcntl | |
from functools import wraps | |
import os | |
def singleton(pid_filename): | |
def decorator(f): |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CXX:=g++ | |
SOURCE:=local-global-snake.cpp \ | |
snake.cpp \ | |
image-process.cpp | |
PROJECT_NAME:=local-global-snake | |
SOURCE_DIR:=source | |
RELEASE_DIR:=release | |
DEBUG_DIR:=debug |
NewerOlder