本文整理匯總了Python中pyLibrary.thread.threads.Queue.__setattr__方法的典型用法代碼示例。如果您正苦於以下問題:Python Queue.__setattr__方法的具體用法?Python Queue.__setattr__怎麽用?Python Queue.__setattr__使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類pyLibrary.thread.threads.Queue
的用法示例。
在下文中一共展示了Queue.__setattr__方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。
示例1: etl_one
# 需要導入模塊: from pyLibrary.thread.threads import Queue [as 別名]
# 或者: from pyLibrary.thread.threads.Queue import __setattr__ [as 別名]
def etl_one(settings):
queue = Queue("temp work queue")
queue.__setattr__(b"commit", Null)
queue.__setattr__(b"rollback", Null)
settings.param.wait_forever = False
already_in_queue = set()
for w in settings.workers:
source = get_container(w.source)
# source.settings.fast_forward = True
if id(source) in already_in_queue:
continue
try:
for i in parse_id_argument(settings.args.id):
data = source.get_key(i)
if data != None:
already_in_queue.add(id(source))
queue.add(Dict(
bucket=w.source.bucket,
key=i
))
except Exception, e:
if "Key {{key}} does not exist" in e:
already_in_queue.add(id(source))
queue.add(Dict(
bucket=w.source.bucket,
key=settings.args.id
))
Log.warning("Problem", cause=e)