call into the rendering-task to deploy the tasks onto the cubes after rendering
This commit is contained in:
parent
d11886698a
commit
a8e0fc7da2
3 changed files with 16 additions and 0 deletions
|
@ -1,5 +1,6 @@
|
||||||
#!/usr/bin/python3
|
#!/usr/bin/python3
|
||||||
|
|
||||||
|
import subprocess
|
||||||
from renderlib import *
|
from renderlib import *
|
||||||
|
|
||||||
# URL to Schedule-XML
|
# URL to Schedule-XML
|
||||||
|
@ -198,3 +199,8 @@ def ticket(ticket):
|
||||||
'$personnames': ticket.get('Fahrplan.Person_list')
|
'$personnames': ticket.get('Fahrplan.Person_list')
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
|
||||||
|
def deploy(ticket, task):
|
||||||
|
for encoder in range(1, 6):
|
||||||
|
print("encoder{n}".format(n=encoder))
|
||||||
|
subprocess.check_call('rsync -v --bwlimit=1000 --progress -e="ssh -A voc@gw.ep14.c3voc.de ssh -A voc@encoder{n}.lan.c3voc.de" {file} :{file}'.format(n=encoder, file=task.outfile), shell=True)
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
#!/usr/bin/python
|
#!/usr/bin/python
|
||||||
|
|
||||||
|
import subprocess
|
||||||
from renderlib import *
|
from renderlib import *
|
||||||
|
|
||||||
# URL to Schedule-XML
|
# URL to Schedule-XML
|
||||||
|
@ -99,3 +100,8 @@ def ticket(ticket):
|
||||||
'$personnames': ticket.get('Fahrplan.Person_list')
|
'$personnames': ticket.get('Fahrplan.Person_list')
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
|
||||||
|
def deploy(ticket, task):
|
||||||
|
for encoder in range(1, 3):
|
||||||
|
print("encoder{n}".format(n=encoder))
|
||||||
|
subprocess.check_call('rsync -v --bwlimit=1000 --progress -e="ssh -A voc@gw.ep14.c3voc.de ssh -A voc@encoder{n}.lan.c3voc.de" {file} :/tmp/'.format(n=encoder, file=task.outfile), shell=True)
|
||||||
|
|
|
@ -40,6 +40,10 @@ def generatePreroll(ticket):
|
||||||
task.workdir = os.path.join(os.getcwd(), projectname, 'artwork')
|
task.workdir = os.path.join(os.getcwd(), projectname, 'artwork')
|
||||||
renderlib.rendertask(task)
|
renderlib.rendertask(task)
|
||||||
|
|
||||||
|
if hasattr(project, 'deploy'):
|
||||||
|
print("deploying")
|
||||||
|
project.deploy(ticket, task)
|
||||||
|
|
||||||
|
|
||||||
while True:
|
while True:
|
||||||
print('Asking RPC for {0}-tickets which are ready for state {1}'.format(ticket_type, ticket_state))
|
print('Asking RPC for {0}-tickets which are ready for state {1}'.format(ticket_type, ticket_state))
|
||||||
|
|
Loading…
Add table
Reference in a new issue