openquake.server package
openquake.server.dbserver module
-
class
openquake.server.dbserver.
DbServer
(address, authkey)[source]
Bases: object
A server collecting the received commands into a queue
-
loop
()[source]
-
openquake.server.dbserver.
get_status
(address=None)[source]
Check if the DbServer is up.
Parameters: | address – pair (hostname, port) |
Returns: | ‘running’ or ‘not-running’ |
-
openquake.server.dbserver.
run_command
(cmd, args, conn)[source]
Execute the received command. Errors are trapped and a pair
(result, exctype) is sent back.
exctype is None if there is no exception, otherwise it is an exception
class and result is an error string containing the traceback.
-
openquake.server.dbserver.
run_commands
()[source]
Execute the received commands in a queue.
-
openquake.server.dbserver.
run_server
(dbpathport=None, logfile='/home/daniele/oqdata/dbserver.log', loglevel='WARN')[source]
Run the DbServer on the given database file and port. If not given,
use the settings in openquake.cfg.
openquake.server.manage module
-
openquake.server.manage.
parse_args
(argv)[source]
-
openquake.server.manage.
use_tmp_db
(tmpfile_port)[source]
openquake.server.middleware module
openquake.server.settings module
openquake.server.stop module
openquake.server.urls module
openquake.server.utils module
-
openquake.server.utils.
get_user_data
(request)[source]
Returns the real username if authentication support is enabled and user is
authenticated, otherwise it returns “platform” as user for backward
compatibility.
Returns also if the user is ‘superuser’ or not.
-
openquake.server.utils.
oq_server_context_processor
(request)[source]
A custom context processor which allows injection of additional
context variables.
openquake.server.views module
-
openquake.server.views.
DEFAULT_EXPORT_TYPE
= 'xml'
For exporting calculation outputs, the client can request a specific format
(xml, geojson, csv, etc.). If the client does not specify give them (NRML)
XML by default.
-
openquake.server.views.
calc
(request, *args, **kwargs)[source]
-
openquake.server.views.
calc_info
(request, *args, **kwargs)[source]
-
openquake.server.views.
calc_remove
(*args, **kwargs)[source]
-
openquake.server.views.
calc_results
(request, *args, **kwargs)[source]
-
openquake.server.views.
cross_domain_ajax
(func)[source]
-
openquake.server.views.
get_engine_version
(request, *args, **kwargs)[source]
-
openquake.server.views.
get_log_size
(request, *args, **kwargs)[source]
-
openquake.server.views.
get_log_slice
(request, *args, **kwargs)[source]
-
openquake.server.views.
get_result
(request, *args, **kwargs)[source]
-
openquake.server.views.
get_traceback
(request, *args, **kwargs)[source]
-
openquake.server.views.
license
(request, *args, **kwargs)[source]
-
openquake.server.views.
log_to_json
(log)[source]
Convert a log record into a list of strings
-
openquake.server.views.
run_calc
(*args, **kwargs)[source]
-
openquake.server.views.
submit_job
(job_ini, user_name, hazard_job_id=None, loglevel='info', logfile=None, exports='')[source]
Create a job object from the given job.ini file in the job directory
and submit it to the job queue. Returns the job ID.
-
openquake.server.views.
validate_nrml
(*args, **kwargs)[source]
-
openquake.server.views.
web_engine
(request, **kwargs)[source]
-
openquake.server.views.
web_engine_get_outputs
(request, *args, **kwargs)[source]
openquake.server.wsgi module
Module contents