Deadline 4.1 Third-Party Script : Nuke *.tmp Cleanup

Nuke (v6.1v1 or earlier) when network processing can sometimes fail and leave its temporary “*.tmp” files behind, which theortically shouldn’t be a problem as it should overwrite them the next time that particular frame is rendered. However, computers don’t always behave, especially on Friday evenings when you want to go home and especially when the file servers in question are running Windows OS :slight_smile:
So. here’s a general and a job script that finds and deletes any *.tmp files on a particular Nuke job or generally via declaring a certain directory to scan.
(The Foundry tell me that v6.1v2 will attempt to fix the underlying issue/s regarding writing to locked render output image files and hence the *.tmp files are fine but fails to overwrite the final output file!)

Hope this helps someone go home on time!

Mike

General Script - install to your \repository\scripts\General\ folder and run it through the Monitor’s “Script” menu.
TmpFramesCleanupGeneral.zip (2.52 KB)

Nuke Job Script - which uses a job’s output folder. Extract to your \repository\scripts\Jobs\ folder and run it through the Monitor by right clicking on a job and selecting “Scripts”.
TmpFramesCleanup.zip (2.49 KB)

Yeah! The Foundry release v6.1v2 which includes BUG fix 9851:

thefoundry.co.uk/products/nu … downloads/

BUG ID 9851 - There was a Windows file permission error occurring on
render with a description “Can’t rename .tmp to final, file exists”

With a bit of luck, this fix should solve the issues which meant the use of the script in this thread was necessary in production.

Thanks a bunch Mike :smiley:
It actually helped me get home on time last friday!
Great stuff!

Cheers,
Dennis

FYI.
The Foundry recently re-opened this BUG from their latest version of Nuke v6.2v2…Fun Fun…
Mike

FYI. I’ve had a report this week it is still an issue in Nuke 9.0v4 on Windows OS.

We are having this issue with our renders. I’ve installed both scripts, after restart the monitor I can see tehm in the menus but when I execute them nothing happens and the .tmp files are not deleted.

We are working with:

Windows 7
Nuke 9v08
Deadline 7.2

Any ideas?

Thanks

There’s been a few API changes between Deadline 4 and 7, so these old scripts would need updating to work. It might be an idea for us to actually ship with them as they are kinda useful and the Nuke issue will always be there and the only real fix is to use Linux. I’ll create an internal ticket to review the code.

I wish we can move to Linux but is not possible at this moment.

Shipping this kind of scripts with Deadline sounds as a very good idea, indeed. I’ll give it a try so I can get familiar with the DL API, if I come with something usable I’ll share it here. An Event Plugin seems to be a better choice for this kind of job, right?

Thanks Mike

I made this Event Plugin at lunch time.

Nothing fancy and I’m sure there is a lot of room for improvement (my Python is even worse than my english :laughing: ) but is working for us. I hope it helps somebody else until you guys have the time to do it properly.

Please, If you install it, be aware that I didn’t test this thoroughly. So, use it at your own risk.

I put some minimal logging that can help to pinpoint errors.

Thanks again.
NukeTmpFilesCleanUp.zip (1.58 KB)

Nice! Something you might want to consider, is pushing your example to our Github site where we welcome clients/users to post their useful scripts/plugins/events for public consumption (assuming you are authorised by your company to do so):

github.com/ThinkboxSoftware/Deadline

Where possible, if we answer a client via a quick script/plugin/event, or we get asked the same question a few times, we tend to whip up a generic example for others and posted them here for events:
github.com/ThinkboxSoftware/Dea … tom/events

Worth a bookmark anyway incase you need something else in the future.

Sure.

I’ll write a proper README and push it to Github

I did a little of housekeeping. Here it is the new version.
NukeTmpFilesCleanUp.zip (2.16 KB)

Is *tmp clear all those jung files or i have to do something else, dell printer error 016-302 helped me to get the solution?