Abraham Schneider wrote:
Is there any chance to use the "Job Dump Command" to delete the log
folder of the actual job? At the moment I'm deleting them at the end of
a project with a script, but it would be nice to have them dumped
immediately after dumping the job.
Yes; if the job server is Windows, be sure to specify the '-nolog'
option to the jobdumpcommand, eg:
jobdumpcommand -nolog //path/to/your/remove-log-dir-script
^^^^^^
This will prevent the jobdumpcommand from generating a log file of its output
which would prevent removal of the directory, due to a Windows 'File is in use'
error. (Unix doesn't have that problem -- you can remove a file while it's open)
If the job server is a Unix machine, you don't really need the -nolog flag,
as unix doesn't have a problem removing files that are 'in use'.
For more info on the -nolog flag, see the jobdumpcommand docs:
http://www.seriss.com/rush-current/rush/rush-submit-cmds.html#JobDumpCommand
NOTE/WARNING/DISCLAIMER:
Take precautions when doing recursive directory removal via scripts.
Not just in rush, but in all contexts.
For instance, imagine what would happen if someone submitted the job
accidentally setting the log directory to the project's production directory.
(When they dump the job, your 'rm -rf' command deletes the logs.. and everything else!)
It is for this reason Rush does not have a simple "push button feature"
to remove log directories -- too scary! ;)
I advise making a small script that verifies the directory you're removing
does not contain any production data, instead of trivially setting the jobdumpcommand
to 'rm -rf $RUSH_LOGDIR' or a 'rmdir /s %RUSH_LOGDIR' as the jobdumpcommand.
Or, instead of doing a recursive remove, just remove all the #### files in that dir,
and the dir itself. That way if it /is/ a production directory, at least it won't
recursively remove subdirs.
--
Greg Ercolano, erco@(email surpressed)
Rush Render Queue, http://seriss.com/rush/
Tel: (Tel# suppressed)
Cel: (Tel# suppressed)
Fax: (Tel# suppressed)
|