openquake.server package#
Subpackages#
- openquake.server.db package
- openquake.server.db.actions module
List
add_checksum()
calc_info()
check_outdated()
create_job()
create_outputs()
db_version()
del_calc()
delete_uncompleted_calculations()
engine_version()
fetch()
find()
finish()
get_calc_ids()
get_calcs()
get_checksum_from_job()
get_dbpath()
get_executing_jobs()
get_job()
get_job_from_checksum()
get_log()
get_log_size()
get_log_slice()
get_longest_jobs()
get_output()
get_outputs()
get_path()
get_result()
get_results()
get_traceback()
get_weight()
import_job()
list_calculations()
list_outputs()
log()
reset_is_running()
set_status()
update_job()
update_job_checksum()
update_parent_child()
upgrade_db()
what_if_I_upgrade()
- openquake.server.db.upgrade_manager module
DuplicatedVersion
UpgradeManager
UpgradeManager.ENGINE_URL
UpgradeManager.UPGRADES
UpgradeManager.check_versions()
UpgradeManager.extract_upgrade_scripts()
UpgradeManager.get_db_versions()
UpgradeManager.init()
UpgradeManager.install_versioning()
UpgradeManager.instance()
UpgradeManager.parse_script_name()
UpgradeManager.read_scripts()
UpgradeManager.upgrade()
VersionTooSmall
VersioningNotInstalled
WrappedConnection
apply_sql_script()
check_script()
db_version()
upgrade_db()
what_if_I_upgrade()
- Module contents
- openquake.server.db.actions module
- openquake.server.v1 package
Submodules#
openquake.server.dbserver module#
- class openquake.server.dbserver.DbServer(db, address, num_workers=5)[source]#
Bases:
object
A server collecting the received commands into a queue
openquake.server.manage module#
openquake.server.middleware module#
- class openquake.server.middleware.LoginRequiredMiddleware(get_response)[source]#
Bases:
object
Middleware that requires a user to be authenticated to view any page other than LOGIN_URL. Exemptions to this requirement can be specified in settings via a list of regular expressions in LOGIN_EXEMPT_URLS.
Requires authentication middleware and template context processors to be loaded. You’ll get an error if they aren’t.
openquake.server.settings module#
openquake.server.urls module#
openquake.server.utils module#
- openquake.server.utils.check_webserver_running(url='http://localhost:8800', max_retries=30)[source]#
Returns True if a given URL is responding within a given timeout.
- openquake.server.utils.get_acl_on(request)[source]#
Returns True if ACL should be honorated, returns otherwise False.
- openquake.server.utils.get_user(request)[source]#
Returns the users from request if authentication is enabled, otherwise returns the default user (from settings, or as reported by the OS).
- openquake.server.utils.get_valid_users(request)[source]#
” Returns a list of users based on groups membership. Returns a list made of a single user when it is not member of any group.
- openquake.server.utils.is_superuser(request)[source]#
Without authentication (settings.LOCKDOW is false) every user is considered a superuser, otherwise look at the attribute request.user.is_superuser.
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.aelo_callback(job_id, job_owner_email, outputs_uri, inputs, exc=None, warnings=None)[source]#
- openquake.server.views.save_pik(job, dirname)[source]#
Save a LogContext object in pickled format; returns the path to it
- openquake.server.views.store(request_files, ini, calc_id)[source]#
Store the uploaded files in calc_dir and select the job file by looking at the .ini extension.
- Returns:
full path of the ini file