A branch is like a folder in a file-system. A branch can contain child branches (folders) and jobs (files), so there is a hierarchy of branches (folders) and jobs (files). Branches are designed to combine and manipulate a set of similar (department, project, scene, asset) jobs.
The first ROOT branch will be created by the system job.
Any job has a sting attribute branch. When a job comes to the server, it looks whether the job branch exists. If the branch exists, this branch becomes the new job parent. If the branch does not exist, server tries to find the parent branch of the new job branch. Then it tries to find the parent of the parent in a cycle (recursion). When it find a matching parent branch (it must do it, as a root branch always exists), it tries to create a child branch if the Auto Create Child ACC flag is set. If the flag is not set, the job will be parented to the most base branch in the branches hierarchy. And the job branch will be updated to the actual parent that the server could find/create.
For example, you have projects mounted in /prj folder. So, you have such folders structure:
Where bus, car, plane and train are project names.
Lets imagine that you have some scene file to render:
When you render that scene for the first time, the /prj branch will be created. As the root branch has Auto Create Child (ACC) flag set by default. No more deeper branch(es) will created on this stage. As the auto-created branch does not have ACC flag set. At this stage job solving will be the same as there are no branches in Afanasy at all. But if you set ACC flag on a new /prj branch, each project will create it’s own branch. So you can manipulate jobs that belongs to some project. For example give some project more priority.
Branch name, that represents branch full path.
Root branch name is always
Parent branch path (name). It is an empty string for the root branch.
Time when branch was created.
Number of child branches (direct childs, not childs of childs).
Total number of child branches and all their sub-childs.
Number of child jobs (direct childs, not childs of childs).
Total number of child jobs and all sub-child branches jobs.
Number of tasks that branch jobs running.
Total capacity of all (total) running tasks.
Branch solving priority.
Maximum tasks limit that branch can produce per second.
Maximum tasks limit that branch can run at the same time.
Maximum tasks limit that branch can run at the same time on the same host.
Branch can be solved only on machines that name matches this mask (regular expression).
Branch can not be solved on machines that name matches this mask (regular expression).
Branch will create a child branch automatically, when a new job asks for it.
By default, branch solves its jobs users by priority. But if this flag is set, branch will solve its jobs directly.
Solve child nodes by priority or order.
Solve child nodes by running capacity total or tasks number.