本文整理匯總了Python中pydio.job.localdb.LocalDbHandler.count_conflicts方法的典型用法代碼示例。如果您正苦於以下問題:Python LocalDbHandler.count_conflicts方法的具體用法?Python LocalDbHandler.count_conflicts怎麽用?Python LocalDbHandler.count_conflicts使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類pydio.job.localdb.LocalDbHandler
的用法示例。
在下文中一共展示了LocalDbHandler.count_conflicts方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。
示例1: post
# 需要導入模塊: from pydio.job.localdb import LocalDbHandler [as 別名]
# 或者: from pydio.job.localdb.LocalDbHandler import count_conflicts [as 別名]
def post(self):
json_conflict = request.get_json()
job_id = json_conflict['job_id']
try:
job_config = JobsLoader.Instance().get_job(job_id)
except Exception:
return "Can't find any job config with this ID.", 404
dbHandler = LocalDbHandler(JobsLoader.Instance().build_job_data_path(job_id))
dbHandler.update_node_status(json_conflict['node_path'], json_conflict['status'])
if not dbHandler.count_conflicts() and job_config.active:
t = PydioScheduler.Instance().get_thread(job_id)
if t:
t.start_now()
return json_conflict