10-16-2019, 04:39 PM
If the process is running on a TACTIC server, for any process to have full access to TACTIC, you can simply initialize the process in Batch mode.
ie: test_script.py
import tacticenv
from pyasm.security import Batch
Batch(project_code=project_code)
import sys
project_code = sys.args[1]
from pyasm.search import Search
animators_logins = Search.eval("@SOBJECT(sthpw/login_in_group['login_group','animator'].sthpw/login)")
....
This will run natively and have the same speed as the TACTIC services. You can run this code with a separate thread (TACTIC is thread-safe) or you can run it in a separate process. From what I can tell, this process can be heavy so you would want to run it as a separate process. You can use a native subprocess to run this as a non-blocking daemon.
ie: test_script.py
import tacticenv
from pyasm.security import Batch
Batch(project_code=project_code)
import sys
project_code = sys.args[1]
from pyasm.search import Search
animators_logins = Search.eval("@SOBJECT(sthpw/login_in_group['login_group','animator'].sthpw/login)")
....
This will run natively and have the same speed as the TACTIC services. You can run this code with a separate thread (TACTIC is thread-safe) or you can run it in a separate process. From what I can tell, this process can be heavy so you would want to run it as a separate process. You can use a native subprocess to run this as a non-blocking daemon.