Kym Watts Posted October 5, 2016 Report Share Posted October 5, 2016 Hello, New to ftrack and its nomenclature. Does any one have a good workflow for creating and testing new event plugins? I currently find my self having to create a new shot everytime i want to test new code in the plugin. I also noticed that i cant query an event, if i try : [e.get('id') for e in session.query('select id,data from Event')] the ids are int's and not the database object id that the event entity like other ftrack entities use. Any help or an arrow in the right direction would be great. Cheers Kym Link to comment Share on other sites More sharing options...
Lucas Correia Posted October 6, 2016 Report Share Posted October 6, 2016 Hi Kym, For the workflow, I would recommend recording and storing an example of some event data and use that data to mock a call to your callback. The events you receive from the event hub are different from the stored `Event` entities. Events are stored for certain kind of `ftrack.update` (mainly, inserts/updates/deletes of items in the project hierarchy) event hub events and are used internally for notifications and activities. The ids of Events are incremental so that they can be easily traversed based on the order of occurrence. As far as I am aware, there is currently no way to map an event hub event to a stored Event. As a side note, the number of stored Events can grow quite large and it is not recommended to query all events. You can use limit, offset and QueryResult.first() to only select a few events when testing. Regards, Lucas Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.