--- a/src/pyams_content_es/include.py Sun Feb 18 12:44:23 2018 +0100
+++ b/src/pyams_content_es/include.py Sun Feb 18 12:45:07 2018 +0100
@@ -18,6 +18,7 @@
import logging
logger = logging.getLogger('PyAMS (content.es)')
+import os.path
import sys
# import interfaces
@@ -51,8 +52,9 @@
def handle_new_application(event):
"""Start indexer process when application created"""
- # check for upgrade mode
- if sys.argv[0].endswith('pyams_upgrade'):
+ # check for PyAMS command line script
+ cmdline = os.path.split(sys.argv[0])[-1]
+ if cmdline.startswith('pyams_'):
return
registry = get_global_registry()