Jump to content

Remus Avram

  • Content Count

  • Joined

  • Days Won


Everything posted by Remus Avram

  1. Hi @Lucas Correia, is it possible to change the behaviour too allow creating version 0 without changing it after the version was created? We need to patch it everywhere we create a new versions.
  2. Thanks @Mattias Lagergren for your answer! For us it's quite important because we are planing to use threads in all of our tools. We would like to use at least 1 thread in order to not freeze the UI while it is fetching the data. You mean something like this: from multiprocessing.dummy import Pool as ThreadPool import ftrack_api from ftrack_api.symbol import Symbol session = ftrack_api.Session() def check_keys(entity): for key in entity.keys(): if isinstance(entity[key], Symbol): print entity, ': ', key def check_children(entity_id): entity =
  3. Hi Mattias, ahh... are you going to make it thread safe? The problem is that if it is not specified when the session is created to not auto-populate, then it should never return a Symbol (NOT SET) value. Creating a session per thread works as expected. But it doesn't help us as the sessions are not connected.
  4. Hi Ftrack Team, we would like to use the ftrack session in threads, but, unfortunately, it seems that ftrack_api is not thread safe. When we are using the session in multiple threads the return of the attribute value of the entities is a Symbol (NOT SET). Please find below a script where we were able to reproduce the issue: from multiprocessing.dummy import Pool as ThreadPool import ftrack_api from ftrack_api.symbol import Symbol session = ftrack_api.Session() def check_keys(entity): for key in entity.keys(): if isinstance(entity[key], Symbol): p
  5. Thanks @Mattias Lagergren for the quick answer. Right! Related issue. Different entity. Nice to hear that you are working on a fix
  6. Hi @Mattias Lagergren, thanks for the advise. This means the database is already indexed by you as you think it's the best for the studios, right?
  7. Thanks @Mattias Lagergren for the explanation. What do you mean by job?
  8. Hi Ftrack Team, I see that there are 5 types of action: add, update, remove, move and job_updated. I am wandering for what job_updated is used for? Best, Remus
  9. Thanks @Mattias Lagergren for you answer. But is it possible to manually re-register all the plugins from a folder? For example i am updating the code of a plugin. In this way the plugin will not be registered again and the new code will not be in use. On the Ftrack server side we are checking every X minutes if there is new code pushed, and if it is, then it is re-launching the actions. Is it possible to do something similar for the Ftrack-Connect?
  10. Hi Ftrack Team, I was checking the Ftrack documentation regarding the database and I didn't find anything about indexing it. Is the database already indexed by you as you think is the best, or do we need to re-index it based on the query logs? Best, Remus
  11. Thanks @Lucas Correia! In this way it works. I didn't think in this way
  12. If I create a new version and then I query the asset again, then the new version is not included in the asset['versions']. Example: asset = session.query("Asset where versions.task.id is '{0}'".format(task['id'])).one() print len(asset['version']) session.create('AssetVersion', {'asset': asset, 'task': task, 'version': 13, 'status': status, } ) session.commit() asset = session.query("Asset where versions.task.id is '{0}'".format(task['id'])).one() print len(asset['version']) ------- Return
  13. Hi @Mattias Lagergren can you please give us an example? I tried like this: session.create('AssetVersion', {'asset': asset, 'task': task, 'version': 0, 'status': status } ) self._session.commit() Using version 0 will just create a new version, not version 0.
  14. Thanks @Mattias Lagergren!
  15. Hi @Mattias Lagergren any updates regarding this issue?
  16. Hi @keyframe we have this already implemented in our system. Let me know if you need any help with it.
  17. Thanks @Eric Hermelin for taking a look! Cleaning the session or re-populating the data works as a workaround. But for long term I hope it will fetch the right data once we query the shot again. There are too many places where we need to patch it, and for users which don't have experience in programming (artists), it's difficult to explain.
  18. Hi all, I have a shot queried from DB via ftrack_api. I update a custom attribute of the respective shot. Then, in the same session, I query the shot again. The custom attribute of the respective shot is not updated even after I queried the shot again. Please find below an example: def test_query_custom_attributes(self): def update_custom_attribute(test_asset): new_session = ftrack_api.Session() same_test_asset = new_session.query("AssetBuild where id is '{0}'".format(test_asset["id"])).one() same_test_asset['custom_attributes
  19. We were able to reproduce the issue `int() argument must be a string or a number, not 'Symbol'` and I can confirm that this is fixed. Tested in Ftrack version `3.5.6` with ftrack_api version `1.3.2`. Thanks for this fix
  20. Is there a way to refresh the webpage through ftrack_api after the script finished running?
  21. +1 Related: https://forum.ftrack.com/topic/815-csv-import-notes/
  22. Hi @Mattias Lagergren, thanks for the thoughts. Both other ways have downsides. The Ftrack notification system is really nice and using it for custom notifications will be great.
  23. No, It doesn't. Instead clearing the cache and querying the data again works. > print len(user['user_security_roles']) 2 > del user['user_security_roles'] > user = get_ftrack_user(username="unittest_artist") > print len(user['user_security_roles']) 2 > session.cache.clear() > user = get_ftrack_user(username="unittest_artist") > print len(user['user_security_roles']) 1
  24. As a workaround we run a script every X minutes which adds the uses added only to the groups to the project, too. """ @package bin.check_projects_members @brief Check if the members of the projects have been added to the project. @details If the user has been added to the project group, but not to the project, then we need to add him/her to the project @author remusav """ import logging import ftrack_session_manager log = logging.module_logger(__name__) session = ftrack_session_manager.main_session def get_grouped_users(project): """ @param project: Ftrack Project
  25. Hi @Björn Rydahl, any updates regarding the issue above? "5. Can not add and then get added roles in the same session:"
  • Create New...