mirror of
https://github.com/ynput/ayon-core.git
synced 2025-12-24 21:04:40 +01:00
OP-3698 - updated docstring
Removed raise, already in function Added default to 1 hour
This commit is contained in:
parent
e48eea04e6
commit
f6899fad62
2 changed files with 6 additions and 5 deletions
|
|
@ -1,5 +1,4 @@
|
|||
import os
|
||||
import sys
|
||||
from datetime import datetime
|
||||
import collections
|
||||
|
||||
|
|
@ -179,7 +178,11 @@ def publish_and_log(dbcon, _id, log, close_plugin_name=None, batch_id=None):
|
|||
|
||||
|
||||
def fail_batch(_id, dbcon, msg):
|
||||
"""Set current batch as failed as there is some problem."""
|
||||
"""Set current batch as failed as there is some problem.
|
||||
|
||||
Raises:
|
||||
ValueError
|
||||
"""
|
||||
dbcon.update_one(
|
||||
{"_id": _id},
|
||||
{"$set":
|
||||
|
|
@ -267,7 +270,7 @@ def get_timeout(project_name, host_name, task_type):
|
|||
timeout_profiles = (get_project_settings(project_name)["webpublisher"]
|
||||
["timeout_profiles"])
|
||||
matching_item = filter_profiles(timeout_profiles, filter_data)
|
||||
timeout = sys.maxsize
|
||||
timeout = 3600
|
||||
if matching_item:
|
||||
timeout = matching_item["timeout"]
|
||||
|
||||
|
|
|
|||
|
|
@ -286,8 +286,6 @@ class PypeCommands:
|
|||
launched_app.terminate()
|
||||
msg = "Timeout reached"
|
||||
fail_batch(_id, dbcon, msg)
|
||||
raise ValueError("Timeout reached")
|
||||
|
||||
|
||||
@staticmethod
|
||||
def remotepublish(project, batch_path, user_email, targets=None):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue