Progress update for command line job

Hey,

I have some command line jobs that I need progress update. Based on docs I figured out that all it needs is printing Progress: #% to STDOUT but it doesn’t seem to do anything.

Example from the job log:
2018-09-05 05:58:57: 0: STDOUT: Progress: 11%
2018-09-05 05:58:57: 0: STDOUT: Progress: 12%
2018-09-05 05:58:57: 0: STDOUT: Progress: 13%
2018-09-05 05:58:57: 0: STDOUT: Progress: 14%

From my understanding this should update the job progress, but it doesn’t. I’m still on Deadline 9.0.2. Am I doing something wrong or it’s an bug ?

Best,
Tomasz

Maybe it’s some kind of encoding issue ?

The command line job actually starts up python with script and some additional arguments. It’s simple ftp uploader, and the code that I use for printing looks like this:

print(“Progress: {}%”.format(progress))

Looks like that progress feature landed in 8.1.5, and I think your encoding and format are good here.

Considering the Slave updates its progress every 7 seconds, maybe it’s going too fast? Looking at your output it looks like it’s just flying through that work. Looking at the Slave UI directly might show it updating faster.

Huh, good point… it looks like it prints everything all at once at the very end of the job process…

2018-09-04 23:24:58: 0: INFO: Invoking: Run Process
2018-09-04 23:36:14: 0: STDOUT: Progress: 0%
2018-09-04 23:36:14: 0: STDOUT: Progress: 1%
2018-09-04 23:36:14: 0: STDOUT: Progress: 2%
2018-09-04 23:36:14: 0: STDOUT: Progress: 3%
2018-09-04 23:36:14: 0: STDOUT: Progress: 4%

2018-09-04 23:36:19: 0: STDOUT: Progress: 98%
2018-09-04 23:36:19: 0: STDOUT: Progress: 99%
2018-09-04 23:36:19: 0: STDOUT: Progress: 100%
2018-09-04 23:36:19: 0: INFO: Process returned: 0
2018-09-04 23:36:19: 0: Done executing plugin command of type ‘Render Task’
2018-09-04 23:36:19: 0: Render time for frame(s): 11.360 m

When I run the script locally I see it’s being printed in real time over that 12 minutes or so… But when it runs on the slave it’s different. Is there some in-between process that catches the output ?

Best,
Tomasz

If it’s python you’ll need to flush your standard output stream more often, or pass it the ‘-u’ flag. Good details over here on Stack Overflow.

I’m having this same issue.
I tried using python -u and sys.stdout.flush()
Here’s the output once the task finishes:
2019-06-25 21:29:44: 0: STDOUT: Progress: 1%
2019-06-25 21:29:45: 0: STDOUT: Progress: 2%
2019-06-25 21:29:46: 0: STDOUT: Progress: 3%
2019-06-25 21:29:47: 0: STDOUT: Progress: 5%
2019-06-25 21:29:48: 0: STDOUT: Progress: 6%
2019-06-25 21:29:49: 0: STDOUT: Progress: 7%
2019-06-25 21:29:50: 0: STDOUT: Progress: 8%
2019-06-25 21:29:51: 0: STDOUT: Progress: 10%

Other than that, I can’t see the progress.

I am still having this problem.

Privacy | Site terms | Cookie preferences