本文整理汇总了Python中biomaj.bank.Bank.remove_pending方法的典型用法代码示例。如果您正苦于以下问题:Python Bank.remove_pending方法的具体用法?Python Bank.remove_pending怎么用?Python Bank.remove_pending使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类biomaj.bank.Bank
的用法示例。
在下文中一共展示了Bank.remove_pending方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: main
# 需要导入模块: from biomaj.bank import Bank [as 别名]
# 或者: from biomaj.bank.Bank import remove_pending [as 别名]
#.........这里部分代码省略.........
Notify.notifyBankAction(bmaj)
if not gres:
sys.exit(1)
if options.freeze:
if not options.bank:
print("Bank name is missing")
sys.exit(1)
if not options.release:
print("Bank release is missing")
sys.exit(1)
bmaj = Bank(options.bank, options)
res = bmaj.freeze(options.release)
if not res:
sys.exit(1)
if options.unfreeze:
if not options.bank:
print("Bank name is missing")
sys.exit(1)
if not options.release:
print("Bank release is missing")
sys.exit(1)
bmaj = Bank(options.bank, options)
res = bmaj.unfreeze(options.release)
if not res:
sys.exit(1)
if options.remove or options.removeall:
if not options.bank:
print("Bank name is missing")
sys.exit(1)
if options.remove and not options.release:
print("Bank release is missing")
sys.exit(1)
if options.removeall:
bmaj = Bank(options.bank, options, no_log=True)
print('Log file: '+bmaj.config.log_file)
res = bmaj.removeAll(options.force)
else:
bmaj = Bank(options.bank, options)
print('Log file: '+bmaj.config.log_file)
res = bmaj.remove(options.release)
Notify.notifyBankAction(bmaj)
if not res:
sys.exit(1)
if options.removepending:
if not options.bank:
print("Bank name is missing")
sys.exit(1)
bmaj = Bank(options.bank, options, no_log=True)
print('Log file: '+bmaj.config.log_file)
res = bmaj.remove_pending(options.release)
if not res:
sys.exit(1)
if options.unpublish:
if not options.bank:
print("Bank name is missing")
sys.exit(1)
bmaj = Bank(options.bank, options, no_log=True)
bmaj.load_session()
bmaj.unpublish()
sys.exit(0)
if options.publish:
if not options.bank:
print("Bank name or release is missing")
sys.exit(1)
bmaj = Bank(options.bank, options, no_log=True)
print('Log file: '+bmaj.config.log_file)
bmaj.load_session()
bank = bmaj.bank
session = None
if options.get_option('release') is None:
# Get latest prod release
if len(bank['production'])>0:
prod = bank['production'][len(bank['production'])-1]
for s in bank['sessions']:
if s['id'] == prod['session']:
session = s
break
else:
# Search production release matching release
for prod in bank['production']:
if prod['release'] == options.release or prod['prod_dir'] == options.release:
# Search session related to this production release
for s in bank['sessions']:
if s['id'] == prod['session']:
session = s
break
break
if session is None:
print("No production session could be found for this release")
sys.exit(1)
bmaj.session._session = session
bmaj.publish()
except Exception as e:
print(str(e))