updating tactic from maya

6 posts / 0 new
Last post
rigatron
updating tactic from maya

hi , i am creating a publish tool in maya so that it exports cache and all to server , and after doing that is it possiable to update the status of the task from YTS to REVIEW, i am trying to connect with the tactic database with the psycopg2 module in python , but i am not able to connect to it ,
any suggession as how to fix it
thanks

Diego
Diego's picture

I think it would be safer to connect via the tactic API:
- copy /home/apache/tactic/src/client/tactic_client_lib to your python path
- check in /home/apache/tactic/src/client/examples and tactic site for examples on how to use the API
- read /home/apache/tactic/src/client/tactic_client_lib/tactic_server_stub.py docstrings for reference.
 
If you really want to connect directly to Postgres check that it is configured to accept TCP connections:
- /var/lib/pgsql/data/postgresql.conf should contain something like "listen_addresses = '*'"
- /var/lib/pgsql/data/postgresql.conf should contain a line permitting login from your host
- Any firewall should accept TCP port 5432

Diego

rigatron

thanks for the info diego , but i have tactic installed in a virtual machine so how do i add the dir in windows...
it may be a noob question .. m new to tactic and i am trying to develop it so could you pls give a bit deeper info it would be really helpfull

Diego
Diego's picture

Hi,
you can download it from your virtual machine with any ssh client or just download the tactic enterprise archive from this site, extract it, get TACTIC-4.5.0.v01/src/client/tactic_client_lib dir and copy it to your python path.
The default python path on windows should be C:\Python27\Lib\site-packages or better add a new path with something like sys.path.append('TACTIC-4.5.0.v01/src/client/') in your program

Diego

rigatron

hi thanks for your info , will check it out and will do let u know if i face any issuesyes

rigatron

hi diego , it works fine thanks so much
i am attaching a sample script if any one else is having trouble setting it up
import sys
sys.path.append(r'D:\client\tactic_client_lib')
from tactic_client_lib import TacticServerStub
server = TacticServerStub( server='<someIp>',project='<someProject>', user='user', password='password')
expr1 = "@GET(vfx/shot['code','002']['sequence_code','bat'].tc_frame_start)"
expr2 = "@GET(vfx/shot['code','002']['sequence_code','bat'].tc_frame_end)"
startFrame = server.eval(expr1)
endFrame = server.eval(expr2)
print startFrame
print endFrame