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
Main Page
Related Pages
+
Namespaces
Namespace List
+
Namespace Members
+
All
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
+
Functions
_
a
b
c
d
e
f
g
i
j
l
m
o
p
r
s
t
u
v
w
+
Variables
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
+
Classes
Class List
Class Index
Class Hierarchy
+
Class Members
+
All
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
z
+
Functions
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
r
s
t
u
v
w
x
+
Variables
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
z
+
Files
File List
▼
HCE Project Python language Distributed Tasks Manager Application, Distributed Crawler Application and client API bindings.
►
HCE project, Python bindings, Distributed Tasks Manager application, Distributed Crawler service.
Todo List
►
Namespaces
►
Classes
▼
Files
►
File List
•
All
Classes
Namespaces
Files
Functions
Variables
Pages
dtm-admin.py
Go to the documentation of this file.
1
#!/usr/bin/python
2
3
4
"""
5
HCE project, Python bindings, Distributed Tasks Manager application.
6
Event objects definitions.
7
8
@package: dtm
9
@file dtm-client.py
10
@author Oleksii <developers.hce@gmail.com>
11
@link: http://hierarchical-cluster-engine.com/
12
@copyright: Copyright © 2013-2014 IOIX Ukraine
13
@license: http://hierarchical-cluster-engine.com/license/
14
@since: 0.1
15
"""
16
17
import
ppath
18
from
ppath
import
sys
19
20
# For profiling
21
import
app.Profiler
as
Profiler
22
23
24
# Start profiling
25
pr = Profiler.Profiler()
26
if
pr
and
pr.status > 0:
27
pr.start()
28
29
30
from
dtma.DTMA
import
DTMA
31
import
dtma.DTMA
32
import
os
33
import
sys
34
import
logging.config
35
36
from
app.Consts
import
EXIT_SUCCESS
37
from
app.Consts
import
EXIT_FAILURE
38
import
app.Consts
as
APP_CONSTS
39
40
41
# That script create main crawler application
42
43
44
app =
None
45
exit_code = EXIT_SUCCESS
46
47
try
:
48
# create the app
49
app =
DTMA
()
50
51
# setup the application
52
app.setup()
53
# add support command line arguments
54
app.args.add_argument(
"-c"
,
"--config"
, action=
"store"
, required=
True
)
55
app.args.add_argument(
"-cmd"
,
"--cmd"
, action=
"store"
, required=
True
)
56
app.args.add_argument(
"-fields"
,
"--fields"
, action=
"store"
)
57
app.args.add_argument(
"-classes"
,
"--classes"
, action=
"store"
)
58
59
# run the application
60
app.run()
61
62
exit_code = app.errorCode
63
64
# log message about profiler
65
if
pr.errorMsg
and
dtma.DTMA.logger:
66
dtma.DTMA.logger.error(pr.errorMsg)
67
68
except
Exception
as
err:
69
if
dtma.DTMA.logger:
70
dtma.DTMA.logger.error(str(err))
71
exit_code = EXIT_FAILURE
72
except
:
73
exit_code = EXIT_FAILURE
74
finally
:
75
# stop profiling
76
if
pr:
77
pr.stop()
78
# close the app
79
if
app:
80
app.close()
81
82
sys.stdout.flush()
83
os._exit(exit_code)
84
dtma.DTMA.DTMA
DTMA Class contents main functional of DTMA application, class inherits from foundation.CementApp.
Definition:
DTMA.py:36
dtma.DTMA
Definition:
DTMA.py:1
app.Consts
Definition:
Consts.py:1
app.Profiler
Definition:
Profiler.py:1
sources
bin
dtm-admin.py
Generated on Fri Nov 24 2017 18:53:52 for HCE Project Python language Distributed Tasks Manager Application, Distributed Crawler Application and client API bindings. by
1.8.13