Module ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias Import alias Import alias Import alias Import alias Import alias Import alias Import alias Import alias Import alias Import alias Import alias Assign NameStore Call AttributeLoad NameLoad attr Str Str Assign NameStore Call AttributeLoad NameLoad attr Str NameLoad Assign NameStore Call AttributeLoad NameLoad attr Str Str Assign NameStore Call NameLoad Call AttributeLoad NameLoad attr Str Num Assign NameStore Call AttributeLoad NameLoad attr Str Str Assign NameStore IfExp NameLoad Call AttributeLoad Call AttributeLoad NameLoad attr NameLoad attr ListLoad NameLoad Assign NameStore Call AttributeLoad NameLoad attr Str NameLoad Assign NameStore Call AttributeLoad NameLoad attr Str Str Assign NameStore Call NameLoad Call AttributeLoad NameLoad attr Str Num Assign NameStore Call NameLoad Call AttributeLoad NameLoad attr Str Num Assign NameStore Call AttributeLoad NameLoad attr Str NameLoad Assign NameStore Call NameLoad Call AttributeLoad NameLoad attr Str Num Assign NameStore Call NameLoad Call AttributeLoad NameLoad attr Str Num Assign NameStore IfExp NameLoad Call AttributeLoad Call AttributeLoad NameLoad attr NameLoad attr ListLoad NameLoad Assign NameStore Call NameLoad Call AttributeLoad NameLoad attr Str Call AttributeLoad NameLoad attr Assign NameStore Call NameLoad Call AttributeLoad NameLoad attr Str BinOpMult NameLoad Num Assign NameStore CompareIn Str AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr Str NameLoad Assign NameStore Call NameLoad NameLoad Call AttributeLoad Call AttributeLoad NameLoad attr Str Str attr Assign NameStore Call AttributeLoad NameLoad attr Str Assign NameStore Call NameLoad keyword NameLoad FunctionDef arguments args NameParam defaults body FunctionDef arguments args defaults vararg kwarg body TryExcept body Expr Call NameLoad NameLoad NameLoad handlers ExceptHandler type NameLoad name NameStore body Expr Call AttributeLoad NameLoad attr NameLoad decorator_list Return NameLoad decorator_list ClassDef bases NameLoad body FunctionDef arguments args NameParam defaults vararg kwarg body Expr Call AttributeLoad Call NameLoad NameLoad NameLoad attr NameLoad NameLoad Assign AttributeStore NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr decorator_list FunctionDef arguments args NameParam NameParam defaults body Assign AttributeStore NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr If Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr body Return Expr Call NameLoad AttributeLoad NameLoad attr decorator_list decorator_list FunctionDef arguments args NameParam defaults body Return Call AttributeLoad NameLoad attr keyword NameLoad keyword TupleLoad NameLoad decorator_list NameLoad FunctionDef arguments args NameParam defaults body Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad With Call NameLoad NameLoad Str NameStore body Assign NameStore Call AttributeLoad NameLoad attr Assign NameStore IfExp NameLoad Call AttributeLoad NameLoad attr NameLoad NameLoad Expr Call NameLoad NameLoad NameLoad NameLoad Expr Call NameLoad NameLoad NameLoad NameLoad Expr Call AttributeLoad NameLoad attr NameLoad decorator_list NameLoad FunctionDef arguments args NameParam NameParam NameParam defaults body For NameStore ListComp NameLoad comprehension NameStore NameLoad NameLoad body Expr Call NameLoad NameLoad NameLoad NameLoad NameLoad decorator_list NameLoad FunctionDef arguments args NameParam NameParam NameParam NameParam defaults body Assign NameStore Call AttributeLoad NameLoad attr keyword NameLoad keyword NameLoad keyword NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad keyword NameLoad keyword Num If CompareEq AttributeLoad NameLoad attr Num body Expr Call AttributeLoad NameLoad attr Call AttributeLoad Str attr NameLoad NameLoad orelse Expr Call AttributeLoad NameLoad attr NameLoad decorator_list NameLoad FunctionDef arguments args NameParam NameParam NameParam defaults body Assign NameStore Call AttributeLoad NameLoad attr Str NameLoad If NameLoad body Assign NameStore BinOpMod Call NameLoad SubscriptLoad NameLoad Index Num NameLoad If CompareNotEq NameLoad Num body Expr Call AttributeLoad NameLoad attr Call AttributeLoad Str attr NameLoad NameLoad NameLoad Return For NameStore ListComp NameLoad comprehension NameStore NameLoad NameLoad body TryExcept body Assign NameStore Call AttributeLoad NameLoad attr keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad Assign NameStore Call AttributeLoad NameLoad attr BinOpAdd BinOpAdd Str NameLoad Str Assign NameStore IfExp NameLoad Call NameLoad NameLoad NameLoad Assign NameStore BinOpAdd Str NameLoad Assign NameStore BinOpAdd Str Call NameLoad Call AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Assign NameStore Call NameLoad Call AttributeLoad NameLoad attr Call AttributeLoad Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad attr Expr Call AttributeLoad NameLoad attr NameLoad NameLoad NameLoad Expr Call AttributeLoad NameLoad attr NameLoad NameLoad NameLoad Expr Call AttributeLoad NameLoad attr NameLoad Str BinOpSub NameLoad NameLoad Expr Call AttributeLoad NameLoad attr Call AttributeLoad Str attr NameLoad NameLoad NameLoad NameLoad handlers ExceptHandler type NameLoad name NameStore body Expr Call AttributeLoad NameLoad attr NameLoad decorator_list NameLoad FunctionDef arguments args defaults body Assign NameStore Call AttributeLoad NameLoad attr Str Assign NameStore NameLoad If NameLoad body Assign NameStore Call AttributeLoad NameLoad attr NameLoad orelse Assign NameStore Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam defaults body For TupleStore NameStore NameStore NameStore Call AttributeLoad NameLoad attr NameLoad keyword NameLoad body For NameStore NameLoad body Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad NameLoad Expr Call AttributeLoad NameLoad attr Call AttributeLoad Str attr NameLoad Expr Call AttributeLoad NameLoad attr NameLoad decorator_list FunctionDef arguments args defaults body Expr Call NameLoad Expr Call AttributeLoad NameLoad attr Str Assign NameStore Call NameLoad Assign NameStore Call NameLoad keyword Num Assign AttributeStore AttributeLoad NameLoad attr attr NameLoad TryFinally body TryExcept body Expr Call NameLoad NameLoad Expr Call AttributeLoad NameLoad attr NameLoad keyword NameLoad keyword NameLoad Expr Call AttributeLoad NameLoad attr While NameLoad body Expr Call AttributeLoad NameLoad attr Num Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr If CompareGt BinOpSub NameLoad AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr keyword Num body Expr Call AttributeLoad NameLoad attr Str Break handlers ExceptHandler type NameLoad name NameStore body Expr Call AttributeLoad NameLoad attr Str ExceptHandler type NameLoad name NameStore body Expr Call AttributeLoad NameLoad attr NameLoad finalbody Expr Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Str decorator_list If CompareEq NameLoad Str body Expr Call NameLoad
N/A threading Thread watchdog.events FileSystemEventHandler watchdog.observers Observer multiprocessing.pool ThreadPool N/A datetime N/A base64 N/A logging N/A os N/A re N/A redis N/A requests N/A sys N/A time N/A uuid N/A multiprocessing N/A FRAMES_PATH N/A N/A os getenv FRAMES_PATH frames N/A HTTP_HOST_LIST_URL N/A N/A os getenv HTTP_HOST_LIST_URL None N/A HTTP_HOST N/A N/A os getenv HTTP_HOST localhost N/A HTTP_PORT N/A int N/A N/A os getenv HTTP_PORT 9080 N/A HTTP_PUBLISH_URL_TEMPLATE N/A N/A os getenv HTTP_PUBLISH_URLS_TEMPLATE http://{host}:{port}/pub?id={channel} N/A http_hosts N/A HTTP_HOST_LIST_URL N/A N/A N/A N/A requests get HTTP_HOST_LIST_URL json N/A HTTP_HOST N/A REDIS_HOST_LIST_URL N/A N/A os getenv REDIS_HOST_LIST_URL None N/A REDIS_HOST N/A N/A os getenv REDIS_HOST N/A REDIS_PORT N/A int N/A N/A os getenv REDIS_PORT 6379 N/A REDIS_DB N/A int N/A N/A os getenv REDIS_DB 0 N/A REDIS_PASSWORD N/A N/A os getenv REDIS_PASSWORD None N/A REDIS_TTL N/A int N/A N/A os getenv REDIS_TTL 60 N/A REDIS_SAMPLE_RATE N/A int N/A N/A os getenv REDIS_SAMPLE_RATE 8 N/A redis_hosts N/A REDIS_HOST_LIST_URL N/A N/A N/A N/A requests get REDIS_HOST_LIST_URL json N/A REDIS_HOST N/A WORKERS N/A int N/A N/A os getenv WORKERS N/A N/A multiprocessing cpu_count N/A EVENT_QUEUE_MAX_SIZE N/A int N/A N/A os getenv EVENT_QUEUE_MAX_SIZE N/A WORKERS 2 N/A BASE64_ENCODE N/A BASE64_ENCODE N/A os environ N/A LOG_FILE N/A N/A os getenv LOG_FILE None N/A LOG_LEVEL N/A getattr logging N/A N/A N/A N/A os getenv LOG_LEVEL debug upper N/A logger N/A N/A logging getLogger broadcaster N/A pool N/A ThreadPool processes WORKERS log_on_error N/A N/A func N/A N/A f N/A N/A N/A args kwargs N/A N/A N/A N/A N/A func args kwargs N/A N/A N/A Exception N/A err N/A N/A N/A N/A logger exception err N/A N/A f N/A EventHandler N/A FileSystemEventHandler N/A __init__ N/A N/A self N/A args kwargs N/A N/A N/A N/A N/A super EventHandler self __init__ args kwargs N/A N/A self last_event N/A N/A N/A datetime datetime now N/A on_created N/A N/A self event N/A N/A N/A N/A self last_event N/A N/A N/A datetime datetime now N/A N/A N/A N/A os path isdir N/A event src_path N/A N/A N/A N/A post_async N/A event src_path N/A N/A post_async N/A N/A path N/A N/A N/A N/A N/A pool apply_async func post args N/A path N/A log_on_error post N/A N/A path N/A N/A N/A channel N/A N/A N/A os path basename N/A N/A N/A os path dirname path N/A N/A open path rb content N/A N/A data N/A N/A content read N/A http_data N/A BASE64_ENCODE N/A N/A base64 b64encode data data N/A N/A post_http channel http_data path N/A N/A post_redis channel data path N/A N/A N/A os remove path N/A log_on_error post_http N/A N/A channel data path N/A N/A N/A host N/A h N/A h http_hosts h N/A N/A N/A post_http_to_host channel data path host N/A log_on_error post_http_to_host N/A N/A channel data path host N/A N/A N/A url N/A N/A HTTP_PUBLISH_URL_TEMPLATE format channel channel host host port HTTP_PORT N/A r N/A N/A requests post url data data timeout 0.5 N/A N/A N/A r status_code 200 N/A N/A N/A N/A logger debug N/A N/A Pushed {} to {} format path url N/A N/A N/A N/A logger error r N/A log_on_error post_redis N/A N/A channel data path N/A N/A N/A digits N/A N/A re findall (\d+) path N/A digits N/A N/A count N/A N/A int N/A digits N/A -1 REDIS_SAMPLE_RATE N/A N/A count 0 N/A N/A N/A N/A logger debug N/A N/A Image {} not sampled ({}/{}). format path count REDIS_SAMPLE_RATE N/A N/A redis_host N/A h N/A h redis_hosts h N/A N/A N/A N/A r N/A N/A redis StrictRedis host redis_host port REDIS_PORT db REDIS_DB password REDIS_PASSWORD N/A channel_ttl N/A N/A r get N/A N/A thumb/ channel /ttl N/A channel_ttl N/A channel_ttl N/A int channel_ttl REDIS_TTL N/A key N/A thumb/ channel N/A blob_key N/A blob/ N/A str N/A N/A uuid uuid4 N/A timestamp N/A N/A N/A os path getmtime path N/A utctimestamp N/A int N/A N/A time mktime N/A N/A N/A N/A N/A datetime datetime utcfromtimestamp timestamp timetuple N/A N/A N/A r zadd key utctimestamp blob_key N/A N/A N/A r setex blob_key channel_ttl data N/A N/A N/A r zremrangebyscore key -inf N/A utctimestamp channel_ttl N/A N/A N/A logger debug N/A N/A Pushed {} to {}. Key={}, utctimestamp={} format path redis_host blob_key utctimestamp N/A N/A N/A Exception N/A err N/A N/A N/A N/A logger error err N/A log_on_error setup_logger N/A N/A N/A N/A N/A formatter N/A N/A logging Formatter %(asctime)s - %(name)s - %(levelname)s - %(message)s N/A handler None N/A LOG_FILE N/A N/A handler N/A N/A logging FileHandler LOG_FILE N/A N/A handler N/A N/A logging StreamHandler N/A sys stdout N/A N/A N/A logger setLevel LOG_LEVEL N/A N/A N/A handler setLevel LOG_LEVEL N/A N/A N/A handler setFormatter formatter N/A N/A N/A logger addHandler handler N/A delete_all_files N/A N/A top N/A N/A N/A N/A root dirs files N/A N/A os walk top topdown False N/A N/A name files N/A N/A path N/A N/A N/A os path join root name N/A N/A N/A logger debug N/A N/A Removing old file {} format path N/A N/A N/A os remove path N/A run N/A N/A N/A N/A N/A N/A setup_logger N/A N/A N/A logger info Started N/A event_handler N/A EventHandler N/A observer N/A Observer timeout 0.1 N/A N/A N/A observer event_queue maxsize EVENT_QUEUE_MAX_SIZE N/A N/A N/A N/A N/A N/A delete_all_files FRAMES_PATH N/A N/A N/A observer schedule event_handler path FRAMES_PATH recursive True N/A N/A N/A observer start N/A True N/A N/A N/A N/A time sleep 1 N/A now N/A N/A N/A datetime datetime now N/A N/A N/A now N/A event_handler last_event N/A N/A datetime timedelta minutes 1 N/A N/A N/A N/A logger warning No events received in the last minute. N/A N/A N/A N/A KeyboardInterrupt N/A err N/A N/A N/A N/A logger warning Keyboard interruption N/A N/A Exception N/A err N/A N/A N/A N/A logger exception err N/A N/A N/A N/A observer stop N/A N/A N/A observer join N/A N/A N/A logger warning Bye N/A N/A N/A __name__ __main__ N/A N/A N/A run