Jump to content

tdugard

Members
  • Content Count

    15
  • Joined

  • Last visited

  1. tdugard

    Event_hub history

    Again me, i add to the previous question : Is there a list somewhere of all event action like 'change.status.task' because at the moment I need to test by hand every change to know every event action possible ?
  2. tdugard

    Event_hub history

    I managed to do it another way not using the event but just the ftrack id of the entity and recurse creation of its ancestors. But last thing the : session.get('Context', id) returns a correct value for Project, Task, Shot, AssetBuild but return None for Note, AssetVersion, Asset how can i know exactly the type of object with only the id ?
  3. tdugard

    Event_hub history

    Hello, i've got a new problem trying to use the event table. When i create shot with a shot template (shot + task) the task are registering event before the shot, here is the output of my tool : 2020-11-23 18:40:44,118 - [ERROR] [#117319] Can't create the task "FX" <ftrack_id:fafc2d40-2db2-11eb-b45c-6e9c55d3c1f9>, missing parent in database <ftrack_id:ed267a70-2daa-11eb-a478-6e9c55d3c1f9> 2020-11-23 18:40:44,359 - [ERROR] [#117320] Can't create the task "Compositing" <ftrack_id:fafbcb16-2db2-11eb-b45c-6e9c55d3c1f9>, missing parent in database <ftrack_id:ed267a70-2
  4. tdugard

    Event_hub history

    The problem is i can't rely on session.get('Context', id) because of the delete operation. When i check a 'delete' event, i can't use that fonction because this entity no longer exists. So i can't check its type when it's a deletion. I managed with lot's of if/else to identify the entity (actually i don't need to reproduce every table of ftrack db just the main ones). Do you planned to rework the event in db so the event hub and event in db are formatted the same way ? That's strange about the users because the eventhub fires an event for user creation/deletion/update. M
  5. tdugard

    Event_hub history

    OK i see how to do that, thanks, but when i tried to manage shot and user events doing queries to the database, i found some bugs : When i got a "Project' event (insert, remove, update, move) the parent type is a show so i think it's the correct behavior but when i got a "Shot" event (insert, remove, update, move) the parent type is a task ? Why a task ? Maybe i'm doing it wrong to know the entity concerned by the event. When i create a user there is no event added to the Events table in ftrack database ! When i used the eventhub callback (my previous solution), user's events (crea
  6. tdugard

    Event_hub history

    I successfully replaced the connection to the eventhub with a custom script querying the ftrack database event using the api but i have one last simple question : Actually i am doing 2 requests to the database : event = session.query('Event where id is "{}"'.format(event_id)).first() events = session.query('Event where created_at > "{}"'.format(event['created_at'])) Is it possible to merge it as one query ?
  7. tdugard

    Event_hub history

    Yes that's what i was looking for ! I can save the last processed event id and then when i reopen my callback i just have to process events that are newer than this id
  8. tdugard

    Event_hub history

    So it's not possible to have the event history with an online ftrack setup ? I came from an another production management software where all the events are stored in logs which was really useful. I think this is a must have feature to develop a strong pipeline.
  9. tdugard

    Event_hub history

    Hello everyone, I'm trying to use the eventHub to replicate ftrack actions into a local database. Everything is working fine but i have 2 questions : It is possible to subscribe to the event_hub with a debug flag to show crashes ? because actually when something went wrong, no exception is raised. To make it solid i need to access the event history. Because if my callback program crashes( (internet failure, machine crashes, or code crashes) i need to know what happenned since the last event I had replicated in my local database. So i can process all the missing events w
  10. The user is just running the tool with a custom launcher written in python (so it's like running a command line) . I have a program called explorer which query ftrack to get all the projects/shot/task information for the user. Once he have choose a task the explorer launch the correct software with the correct context. I don't use ftrack connect. I have my own database for our projects, the goal is to work with the local DB and replicate the data in the ftrack one to use the Web UI to manage projects easily
  11. I want the user to query the ftrack database using my python tool (listing projects, pick a shot, task, etc...) but i need this user to be bounded to his permissions. The global API keys aren't limited to the user's role so i need to use the user's key but i don't know how to get it to set the environment variable. The best way in my opinion is to ask the user for his ftrack login/pass to request his API key. But maybe i'm wrong...
  12. Hello, i've tried again but still stuck. If someone can help me with this problem My previous message explains everything. I can't find in the help file the way to use the user api key, so in the session creation i use a global one that I've created. But when i use it the queries aren't bounded to the user's permission
  13. That's the problem, i've tested my code with 2 differents users : me : I can see every project user2 : who can see only one project in his web browser And the result of the query Project where status is active is the same for both user. That's why i'm asking for help to know where is the problem. Is it because i use the same global api_key i've created ? Do i need to use user's api key ? if its the only way how can i get this key by code ?
  14. Thanks for the quick reply, but the problem i see here is that a user with some coding skill can easily create a function using environment variables that can show the entire project list and can query everything ? Even if in webview he can't see all the projects.. The better solution is to use the user auth_key to connect to the session but i have no clue how to request it via user/password because actually i'm using a global API_key that i have created in Security > Api Keys Like you said i need the result bounded to the user permissions. How can i acheive that ?
  15. Hello everyone, I've recently begin to connect my studio tool to ftrack via the ftrack python API, but something is bothering me. I've generate an API key for the pipeline tool and i'm using it with a user account Here is a part of my code import ftrack_api import os os.environ['FTRACK_SERVER'] = 'https://myserver.ftrackapp.com' # the generic API key os.environ['FTRACK_API_KEY'] = 'my_api_key' # the user name session = ftrack_api.Session(api_user='the_user') def get_project_id_by_name(project_name): project_id = session.query('select id from Project where name is "{0}"'.f
×
×
  • Create New...