Hello,
We currently have our clients connected to an RCS. I’m using an “OnJobSubmitted” event to do a few things like setting job env vars, etc. I’d like to be able to determine the repository “custom” directory path, but I can’t seem to do so when connected via an RCS. I realize this is probably by design, and the RCS may prevent access to those particular network locations.
I’ve tried using a few different solutions:
RepositoryUtils.GetCustomEventsDirectory()
RepositoryUtils.GetRootDirectory()
self.GetEventDirectory()
Is there another way I could gather this info?
Thanks,
-Jake
Thanks for reaching out, I have tested this having my client connected to RCS, using OnJobSubmitted event and able to get events path that is cached, below is the function added to my script
can you please provide more details about what you are trying to do by your OnJobSubmitted Script, feel free to share the script to understand your end goal!
Hello @Nreddy,
Thanks for your reply. I was trying to route back to the original repo’s “custom” folder location, not the local events cache on the client. However, we have found a workaround to accomplish what we needed. Still, would be good to know if there is a way to find that original repo location if we are connected via an RCS.
-Jake
@JakeS Thanks for an update here, I am glad you were able to find the workaround on the custom folder location. To retrieve the Repository path within the script, you can make use of the “GetRepositoryPath” scripting API. It returns the appropriate full path to the given subdirectory of the Repository.
As an example this would return the worker repository path to the plugins subdirectory:
As you are running RCS, by default it keeps a local cache of the Repository on the client and it may return the cache path of the repository from the client.