AWS Thinkbox Discussion Forums

Event plugin, but "opt-out"?

Hello,

I’m writing an event plugin that runs “On Job Finished” to clean up (remove) intermediate files (i.e. .ass and .rs)

Currently it is State: Opt-In
But then the user has to go into the properties and check-mark this after submitting the Houdini/Arnold job.

Is there a way to have this globally enabled, but have an “opt-out”? It’s only happened once where the person needed the *.ass or *.rs files the next day, but OTH they could regenerate the ass files.

Any suggestions or opinions?

thanks,
J.

2 Likes

I put a feature request in for this kind of thing, would love to see it as an optional feature on submission.

But also to see it as a post job clean up option, so if you delete an old job then it cleans up these files also, could it possible to run your plugin this way
OnJobDeleted
if the job is deleted it deletes the intermediate export files?

2 Likes

Exactly my thoughts. I mentioned to my co-worker about using OnJobDeleted for the cleanup of files that the artist may have not opted in on the event plugin. Possibly useful for deleting the temp Quick Draft movies too.

Yesterday, I just showed someone how to enable our “IntermediateCleanup” event plugin and they managed to remember to enable it on three out of four Arnold jobs. (Better than I expected.)

Since you are already creating an event plugin, why not add an OnJobSubmitted callback that enables the tickbox on the same event plugin on the Job?

That way you can still untick it but it’s ticked by default.

Thanks for the OnJobSubmitted suggestion. I briefly looked at it this morning and I called GetJobInfoKeys and can see the key I’d like to use is “EventOptIns”. However I’m not seeing anything for setting a value for it. I only see SetJobExtraInfoKeyValue but not something like “SetJobInfoKeyValue”.

I tried finding examples that haveEventOptIns and I only see it on the manual job submission/deadlinecommand.

Currently, I’m thinking that the cleanup as Opt-In and then followed up as OnJobDeleted should be sufficient. Still have to write the OnJobDeleted event and see how much of a load the file deletions will be on the localhost. From reading, I think OnJobDeleted runs from the monitor and not the worker.

thanks again

You could also send a new deletion job from the OnJobDeleted event.

Testing the OnJobDeleted event and it seems to be working as expected. Also added a check to query and delete the temp Quick Draft movies that get auto-generated after renders.

@anthonygelatka @RicardoMusch : Thanks again for the suggestions!

2 Likes
Privacy | Site terms | Cookie preferences