Files not getting deleted after job finishes

Post Reply
crisosie
Posts: 2
Joined: Thu Jun 21, 2018 12:00 pm

Files not getting deleted after job finishes

Post by crisosie »

Hello!
We've been using Afanasy for a while but have just discovered how to use the Maya plugin for it. We have noticed that the plugin creates a temporary .mb file that it should delete at the end of the job. But when the render job has finished the temporary file always stays there if sent from the Maya plugin.
If we send a job from the main Afanasy Send Job app no temporary files are left at the end of the job. I have checked the plugins code and have noticed that it is setting the deletefiles command when creating the job:

Code: Select all

job.setCmdPost('deletefiles "%s"' % os.path.abspath(filename))
Just in case, I changed the previous code to

Code: Select all

job.setPostDeleteFiles(os.path.abspath(filename))
but it still doesn't do anything. I forced the plugin to send a specific file to delete and then checked the job which is being sent to afanasy:

Code: Select all

{'folders': {'input': 'C:/Users/cristiansoler/Documents/maya/projects/default/scenes', 'output': 'C:/Users/cristiansoler/Documents/maya/projects/default/images'}, 'command_post': 'deletefiles "C:/Users/cristiansoler/Documents/maya/projects/default/scenes/testRedshift.180621-135228-622.mb"', 'blocks': [{'files': ['C:/Users/cristiansoler/Documents/maya/projects/default/images/testRedshift.png'], 'capacity': 1000, 'name': u'defaultRenderLayer', 'service': 'maya_redshift', 'frames_per_task': 1, 'parser': 'maya_redshift', 'command': 'mayarender -s @#@ -e @#@ -b 1 -rl "defaultRenderLayer" -proj "C:\\Users\\cristiansoler\\Documents\\maya\\projects\\default" C:/Users/cristiansoler/Documents/maya/projects/default/scenes/testRedshift.180622-083008-760.mb', 'frame_last': 4, 'working_directory': 'C:\\Users\\cristiansoler', 'frame_first': 1, 'flags': 1, 'frames_inc': 1}], 'name': 'testRedshift', 'time_creation': 1529649008, 'priority': 99, 'host_name': 'bikes18', 'user_name': 'cristiansoler'}
everything looks okay to me... does anyone know why this is happening and how to solve it?
User avatar
timurhai
Site Admin
Posts: 910
Joined: Sun Jan 15, 2017 8:40 pm
Location: Russia, Korolev
Contact:

Re: Files not getting deleted after job finishes

Post by timurhai »

Hello!

Post command is a command that will be executed on a job deletion.
Server process does not executes anything itself.
It pushes jobs post commands to the specific system job.
That system job tries to execute its tasks on a farm, like other jobs.

You should look at the system on such problems, its name is "afanasy" and user "afadmin".
To see other(all) users jobs, gui should be in the "GOD" mode (default password is "iddqd").
You should ensure that the system job can run on your farm (nimby states, services and so on).

Also you can see system job log for a tasks errors, like not enough permissions to delete a file.
Timur Hairulin
CGRU 3.3.1, Ubuntu 20.04, 22.04, MS Windows 10 (clients only).
Post Reply