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
processor_store_content_kvdb.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: dc
9 @file processor_store_content_kvdb.py
10 @author Oleksii <developers.hce@gmail.com>
11 @link: http://hierarchical-cluster-engine.com/
12 @copyright: Copyright &copy; 2013-2014 IOIX Ukraine
13 @license: http://hierarchical-cluster-engine.com/license/
14 @since: 0.1
15 """
16 
17 
18 import ppath
19 from ppath import sys
20 
21 import os
22 from dc_processor.ProcessorStoreContentKVDB import ProcessorStoreContentKVDB
23 from dc_processor.ProcessorStoreContentKVDB import EXIT_SUCCESS
24 from dc_processor.ProcessorStoreContentKVDB import EXIT_FAILURE
25 
26 
27 # That script create main crawler application
28 
29 
30 # create the app
32 exit_code = EXIT_SUCCESS
33 
34 try:
35  # setup the application
36  app.setup()
37  # run the application
38  app.run()
39  app.processBatch()
40  exit_code = app.getExitCode()
41 except Exception as err:
42  print err.message
43  exit_code = EXIT_FAILURE
44 finally:
45  # close the app
46  app.close()
47  os._exit(exit_code)