ensure that the file exists before leaving
This commit is contained in:
parent
c8084988f5
commit
4d92bd486a
1 changed files with 6 additions and 4 deletions
|
@ -103,14 +103,15 @@ def render(event):
|
||||||
locationpath=intermediate_clip)
|
locationpath=intermediate_clip)
|
||||||
|
|
||||||
while True:
|
while True:
|
||||||
|
time.sleep(5)
|
||||||
ps = subprocess.check_output(shlex.split('ps aux')).decode('utf-8')
|
ps = subprocess.check_output(shlex.split('ps aux')).decode('utf-8')
|
||||||
|
|
||||||
pscnt = ps.count('compressord')
|
pscnt = ps.count('compressord')
|
||||||
if pscnt == 0:
|
filexists = os.path.isfile(intermediate_clip)
|
||||||
|
if pscnt == 0 and filexists:
|
||||||
break
|
break
|
||||||
|
|
||||||
print(" still "+str(pscnt)+" Compressor.app-processes running")
|
print(" "+str(pscnt)+" Compressor.app-processes running, filexists? "+str(filexists))
|
||||||
time.sleep(5)
|
|
||||||
|
|
||||||
|
|
||||||
print(" generated intermediate-clip in " + intermediate_clip + ", now starting transcoder")
|
print(" generated intermediate-clip in " + intermediate_clip + ", now starting transcoder")
|
||||||
|
@ -134,5 +135,6 @@ for event in events:
|
||||||
i=i, n=n,
|
i=i, n=n,
|
||||||
id=event['id'],
|
id=event['id'],
|
||||||
title=event['title']))
|
title=event['title']))
|
||||||
render(event)
|
|
||||||
|
|
||||||
|
render(event)
|
||||||
|
print()
|
||||||
|
|
Loading…
Add table
Reference in a new issue