Exemple #1
0
#    PROPRIETARY INFORMATION.  This software is proprietary to
#    Southpaw Technology, and is not to be reproduced, transmitted,
#    or disclosed in any way without written permission.
#
#


# scripts that starts up a number of Tactic and monitors them

__all__ = ['TacticThread', 'TacticTimedThread', 'WatchFolderThread', 'ASyncThread', 'TacticMonitor', 'CustomPythonProcessThread']


import os, sys, threading, time, urllib, random, subprocess, re
import tacticenv
tactic_install_dir = tacticenv.get_install_dir()
tactic_site_dir = tacticenv.get_site_dir()
app_server = "cherrypy"

#try:
#    import setproctitle
#    setproctitle.setproctitle("TACTICmaster")
#except:
#    pass


from pyasm.common import Environment, Common, Date, Config, jsonloads, jsondumps
from pyasm.search import Search, DbContainer, SearchType

python = Config.get_value("services", "python")
if not python:
    python = os.environ.get('PYTHON')
Exemple #2
0
#
#

import os, sys


# set up environment
os.environ['TACTIC_APP_SERVER'] = "cherrypy"
os.environ['TACTIC_MODE'] = "development"
os.environ['TACTIC_CLEANUP'] = "true"

import tacticenv
from pyasm.common import Environment, Config

tactic_install_dir = tacticenv.get_install_dir()
tactic_site_dir = tacticenv.get_site_dir()


sys.path.insert(0, "%s/src" % tactic_install_dir)
sys.path.insert(0, "%s/tactic_sites" % tactic_install_dir)
sys.path.insert(0, tactic_site_dir)
sys.path.insert(0, "%s/3rd_party/CherryPy" % tactic_install_dir)


def startup(port, server=""):

    from tactic.startup import FirstRunInit
    cmd = FirstRunInit()
    cmd.execute()

    log_dir = "%s/log" % Environment.get_tmp_dir()