HCE Project Python language Distributed Tasks Manager Application, Distributed Crawler Application and client API bindings.  2.0.0-chaika
Hierarchical Cluster Engine Python language binding
Constants.py
Go to the documentation of this file.
1 '''
2 Created on Mar 19, 2014
3 
4 @package: dtm
5 @author: scorp
6 @link: http://hierarchical-cluster-engine.com/
7 @copyright: Copyright © 2013-2014 IOIX Ukraine
8 @license: http://hierarchical-cluster-engine.com/license/
9 @since: 0.1
10 '''
11 
12 APP_NAME = "dtmc"
13 DEFAULT_CONFIG_NAME1 = "./dtmc.ini"
14 DEFAULT_CONFIG_NAME2 = "/ect/dtmc.ini"
15 TCP_TIMEOUT = 10000
16 TCP_TIMEOUT_CONFIG_NAME = "timeout"
17 DTM_HOST = "clientHost"
18 DTM_PORT = "clientPort"
19 TASKS = ["NEW", "CHECK", "TERMINATE", "GET", "STATUS", "CLEANUP", "GET_TASKS"]
20 LOG_CONFIG_SECTION_NAME = "Application"
21 LOG_CONFIG_OPTION_NAME = "log"
22 
23 ERROR_STR1 = "Not present [--help] or [--task] mandatory args"
24 ERROR_STR2 = "Absents [--file] arg with [--task] arg"
25 ERROR_STR3 = "[--task] arg's value not present in value's list"
26 ERROR_STR4 = "[--file] wrong filename"
27 ERROR_STR5 = "Wrong JSON format"
28 ERROR_STR6 = "DTMC exception msg={0}"
29 ERROR_STR7 = "Network communicate timeout={0} mls"
30 ERROR_STR8 = "Wrong Response eventObject type for {0} must be {1}"
31 ERROR_STR9 = "Not open Config file"
32 ERROR_STR10 = "Can't find log-ini section in config file"
33 ERROR_STR11 = "Error while log initialize"
34 ERROR_STR12 = "TCP Connection Error"
35 ERROR_STR13 = "Some Config section error"
36 ERROR_STR14 = "Unknown task"
37 
38 
39 ERROR_NOERROR = 0
40 ERROR_NO_CONFIG = 2
41 ERROR_ARGS1 = 2
42 ERROR_ARGS2 = 2
43 ERROR_BAD_TASK = 2
44 ERROR_CONFIG_SECTION = 2
45 ERROR_BAD_FILE_NAME = 1
46 ERROR_BAD_JSON = 1
47 ERROR_DTMC = 1
48 ERROR_NETWORK = 1
49 ERROR_WRONG_RESPONSE = 1
50 ERROR_LOG_SECTION_ERROR = 1
51 ERROR_LOG_INIT = 1
52 ERROR_CONNECTION = 1
53 ERROR_UNKNOWN_TASK = 1