@scriptcache is now just for displaying the contents of the script cache. After changing a script parent, you may now @reload/script to apply any changes. @reload with no arguments will now show you all of the possible switches. Also added an 'all' switch that will reload everything in one fell swoop.
This commit is contained in:
parent
ffa03309fc
commit
2cc3d98810
3 changed files with 38 additions and 36 deletions
|
|
@ -6,6 +6,7 @@ interaction with actual script methods should happen via calls to Objects.
|
|||
"""
|
||||
import os
|
||||
from traceback import format_exc
|
||||
from twisted.python.rebuild import rebuild
|
||||
from django.conf import settings
|
||||
from src import logger
|
||||
|
||||
|
|
@ -13,6 +14,14 @@ from src import logger
|
|||
# contain references to the associated module for each key.
|
||||
CACHED_SCRIPTS = {}
|
||||
|
||||
def rebuild_cache():
|
||||
"""
|
||||
Rebuild all cached scripts.
|
||||
"""
|
||||
cache_dict = CACHED_SCRIPTS.items()
|
||||
for key, val in cache_dict:
|
||||
rebuild(val)
|
||||
|
||||
def scriptlink(source_obj, scriptname):
|
||||
"""
|
||||
Each Object will refer to this function when trying to execute a function
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue