Jump to content

An action script for All User


fauzi

Recommended Posts

Posted

Hi and welcome to the forums!

Yes, it is absolutely possible and there are two things involved here:

1. The action script runs centralised on a machine somewhere at the company. So in this case you would not run it inside Connect but centralised somewhere.

2. The action script is discoverable to all users and not targeting a specific user. So omitting the filtering on user that is highlighted in this link: http://ftrack.rtd.ftrack.com/en/stable/developing/actions.html?highlight=source.user.username=

  • 3 weeks later...
Posted
On 11/19/2016 at 9:57 AM, fauzi said:

Hello, is there way to close session in ftrack, such session.close(). I think it very necessary. Thanks Mattias.

What is your use-case for closing the session? If you have a long running script that creates multiple sessions rapidly it may be a good idea, especially to disconnect the event hub: session.event_hub.disconnect()

Posted

I have bad behavour user/uploader which put images on single directory and upload concurrently, hundreds/thousand images/videos. I modify your image_encoder action and send it to celery-redis 31 workers,i create a new session on it.

Posted

If you want to close a session early you have to use the private session._request and run session._request.close()

When creating a lot of sessions it is a good idea to not have them connecting to the event_hub by setting auto_connect_event_hub to False when creating the session:

ftrack_api.Session(..., auto_connect_event_hub=False)

 

Posted

Seems because api connection thru https, bit slower, for all workers i do direct connection to maria in asset, asset_version, asset_type and meta. Solved.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...