--
You received this message because you are subscribed to the Google Groups "gaffer-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to gaffer-dev+...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/gaffer-dev/b51aba5b-e073-45b9-92be-f69f971c7173n%40googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/gaffer-dev/CANHZvCN56g8Kd%2B6PZ1eutA5D2MKio%3DWiVRAi5_ELgmoq1w848Q%40mail.gmail.com.
To view this discussion visit https://groups.google.com/d/msgid/gaffer-dev/8f0130fa-8c95-4e48-9a95-87b4ad1620efn%40googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/gaffer-dev/CAB8pVg%2B-e3NGwscnAV1m%2BczSGq0fNvVFmHYXKUkOXpBojy0o6A%40mail.gmail.com.
Thanks for checking! I'm actually wondering if I should call 'Dispatcher::execute()' myself when hitting a dispatcher node. Right now, when creating 'chores', which are basically jobs that get executed on the farm, I skip dispatcher nodes in line 317. What do you think?
--
You received this message because you are subscribed to the Google Groups "gaffer-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to gaffer-dev+...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/gaffer-dev/CAB8pVgJg4UE4dkWsJ8nVpdEdXUvcANzcna2-5e2fxo_sQL_iLg%40mail.gmail.com.
I double checked the shipped TractorDispatcher and I can't see any '.execute()' call either.
Ok, I got it working. I called '.execute()' on the dispatcher node, but I had to do it on it's "task" component.
I'm still trying to wrap my head around your comment about the '.frames()' topic.
If I remember well, I added the current frame of the script to the context because I had python expressions that got evaluated (probably from job name evaluation) that depend on it. Should this be handled differently or is my current approach valid?
def _create_all_chores(self, script_node: Gaffer.ScriptNode) -> None:
"""Create all chores of the stored gaffer jobs.
:param script_node: The Gaffer script node.
"""
context = _get_context_from_environment(script_node)
jobs_mapping: dict[UFXGafferJob, list[Chore]] = {}
for job in self._jobs:
if isinstance(job.gaffer_batch.node(), UFXDispatcher):
node = job.gaffer_batch.node()
node.do_submit = False
node["task"].execute()
chores = node.chores
if chores:
jobs_mapping[job] = chores
self._chores.extend(chores)
else:
chore = self._create_chore(job, context)
if chore is not None:
jobs_mapping[job] = [chore]
self._chores.append(chore)
for gafferjob, chores in jobs_mapping.items():
for chore in chores:
self._setup_chore_dependencies(chore, gafferjob, jobs_mapping)
--
You received this message because you are subscribed to the Google Groups "gaffer-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to gaffer-dev+...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/gaffer-dev/CAB8pVgJ6y4iBPmE%3D12Xv_R_JwFO5t17EY6KrmjQb6oLHJuHJRQ%40mail.gmail.com.
Just a little additional question related to the nested dispatchers in your tractor setup: if I get it correctly, your upstream dispatcher would generate its jobs inside the farm job, right? In that case, those job wouldn't be in any kind of upstream job dependency, right?
In my approach, when creating my farm jobs (via the 'chores' system), I actually generate the upstream farm jobs if I'm looping over an upstream dispatcher which I append in the job dependency chain. In the end, I get all jobs with correct dependencies that get submitted all at once. Code-wise, it looks a bit less elegant, but the tests that I ran on my side looked correct to me.