utils
ResumableError
Bases: Exception
Error which could be temporary, skip current loop, try next time
Source code in client/ayon_sitesync/utils.py
10 11 12 |
|
SiteAlreadyPresentError
Bases: Exception
Representation has already site skeleton present.
Source code in client/ayon_sitesync/utils.py
15 16 17 |
|
get_linked_representation_id(project_name, repre_entity, link_type, max_depth=None)
Returns list of linked ids of particular type (if provided).
One of representation document or representation id must be passed. Note: Representation links now works only from representation through version back to representations.
Todos
Missing depth query. Not sure how it did find more representations in depth, probably links to version? This function should probably live in sitesync addon?
Parameters:
Name | Type | Description | Default |
---|---|---|---|
project_name | str | Name of project where look for links. | required |
repre_entity | dict[str, Any] | Representation entity. | required |
link_type | str | Type of link (e.g. 'reference', ...). | required |
max_depth | int | Limit recursion level. Default: 0 | None |
Returns:
Type | Description |
---|---|
List[ObjectId] Linked representation ids. |
Source code in client/ayon_sitesync/utils.py
61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 |
|
time_function(method)
Decorator to print how much time function took. For debugging. Depends on presence of 'log' object
Source code in client/ayon_sitesync/utils.py
35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 |
|