Module Import alias FunctionDef arguments args defaults body Import alias Import alias Import alias Import alias ImportFrom alias Expr Call AttributeLoad AttributeLoad NameLoad attr attr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr NameLoad ImportFrom alias ImportFrom alias Assign NameStore Call AttributeLoad NameLoad attr keyword Str Expr Call AttributeLoad NameLoad attr Str Str keyword Str keyword NameLoad keyword Str Expr Call AttributeLoad NameLoad attr Str Str keyword Str keyword Str keyword Str Expr Call AttributeLoad NameLoad attr Str Str keyword Str keyword NameLoad keyword NameLoad keyword Str Expr Call AttributeLoad NameLoad attr Str Str keyword Str keyword Num keyword Str Expr Call AttributeLoad NameLoad attr Str Str keyword Str keyword Num keyword Str Expr Call AttributeLoad NameLoad attr Str Str keyword Str keyword Str keyword Str Assign NameStore Call NameLoad Call AttributeLoad NameLoad attr Assign NameStore Call NameLoad SubscriptLoad NameLoad Index Str Assign NameStore Call NameLoad SubscriptLoad NameLoad Index Str Assign NameStore SubscriptLoad NameLoad Index Str Assign NameStore SubscriptLoad NameLoad Index Str Assign NameStore SubscriptLoad NameLoad Index Str Assign NameStore SubscriptLoad NameLoad Index Str Assign NameStore Call AttributeLoad NameLoad attr keyword NameLoad keyword NameLoad Assign NameStore Call NameLoad NameLoad NameLoad Assign NameStore Call NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad FunctionDef arguments args NameParam defaults body For NameStore Call NameLoad Num NameLoad body Expr Call AttributeLoad NameLoad attr BinOpAdd Str Call NameLoad NameLoad NameLoad decorator_list Print Str BinOpMult NameLoad Num Str Expr Call NameLoad BinOpMult NameLoad Num FunctionDef arguments args defaults body Print Str Assign NameStore Call AttributeLoad NameLoad attr Assign NameStore Num While NameLoad body Assign NameStore Call AttributeLoad NameLoad attr If NameLoad body Print Str NameLoad Str BinOpSub Call AttributeLoad NameLoad attr NameLoad AugAssignAdd NameStore Num decorator_list TryExcept body Expr Call NameLoad handlers ExceptHandler type NameLoad body Pass Expr Call AttributeLoad NameLoad attr Print Str decorator_list If CompareEq NameLoad Str body Expr Call AttributeLoad NameLoad attr Call NameLoad
N/A N/A sys main N/A N/A N/A N/A N/A argparse N/A redis N/A time N/A sys os path N/A N/A N/A N/A sys path append N/A N/A path dirname N/A N/A path dirname N/A N/A path abspath __file__ scutils.redis_queue RedisPriorityQueue scutils.redis_throttled_queue RedisThrottledQueue N/A parser N/A N/A argparse ArgumentParser description Throttled Queue Test Script. Start either a single or multiple processes to see the  throttled queue mechanism in action. N/A N/A N/A parser add_argument -r --redis-host action store required True help The Redis host ip N/A N/A N/A parser add_argument -p --redis-port action store default 6379 help The Redis port N/A N/A N/A parser add_argument -m --moderate action store_const const True default False help Moderate the outbound Queue N/A N/A N/A parser add_argument -w --window action store default 60 help The window time to test N/A N/A N/A parser add_argument -n --num-hits action store default 10 help The number of pops allowed in the given window N/A N/A N/A parser add_argument -q --queue action store default testqueue help The Redis queue name N/A args N/A vars N/A N/A parser parse_args N/A window N/A int N/A args N/A window N/A num N/A int N/A args N/A num_hits N/A host N/A args N/A redis_host N/A port N/A args N/A redis_port N/A mod N/A args N/A moderate N/A queue N/A args N/A queue N/A conn N/A N/A redis Redis host host port port N/A q N/A RedisPriorityQueue conn queue N/A t N/A RedisThrottledQueue conn q window num mod push_items N/A N/A amount N/A N/A N/A i N/A range 0 amount N/A N/A N/A N/A t push N/A item- N/A str i i N/A N/A Adding N/A num 2 items for testing N/A N/A push_items N/A num 2 read_items N/A N/A N/A N/A N/A Kill when satisfied ^C N/A ti N/A N/A time time N/A count 0 N/A True N/A N/A item N/A N/A t pop N/A item N/A N/A My item item My time: N/A N/A N/A time time ti N/A count 1 N/A N/A N/A N/A N/A read_items N/A N/A N/A KeyboardInterrupt N/A N/A N/A N/A N/A t clear N/A Finished N/A N/A N/A __name__ __main__ N/A N/A N/A N/A sys exit N/A main