Stopping IRIS processes caching Python code
We're having a problem with the way Python modules are being cached in Iris. If we modify some code and then reimport a module it is still processing the old code.
E.g. Create a python file:
helloWorld.py
def helloWorld() :
return "Hello world"
The run the following in the Iris terminal:
SOURCENEW>set helloWorld = ##class(%SYS.Python).Import("helloWorld")
SOURCENEW>w helloWorld.helloWorld()
Hello world
Modify helloWorld.py
def helloWorld() :
return "Hello world again"
In the same terminal process run the commands again, the same result is even though the code has been changed.
SOURCENEW>kill helloWorld
SOURCENEW>set helloWorld = ##class(%SYS.Python).Import("helloWorld")
SOURCENEW>w helloWorld.helloWorld()
Hello world
Only when I start a new process is the new code used.
Is there a way we can we stop the code from being cached without killing all the processes that have loaded it?