Package gridmap :: Module data

Module data

source code

This modules provides all of the data-related function for gridmap.


Authors:
Christian Widmer, Cheng Soon Ong, Dan Blanchard (dblanchard@ets.org)
Functions
 
clean_path(path)
Replace all weird SAN paths with normal paths.
source code
 
zsave_db(obj, redis_server, prefix, job_num)
Saves an object/function as bz2-compressed pickled data in a Redis database
source code
 
zload_db(redis_server, prefix, job_num)
Loads bz2-compressed pickled object from a Redis database
source code
Variables
  MAX_TRIES = 10
  SLEEP_TIME = 3
  __package__ = None
Function Details

clean_path(path)

source code 

Replace all weird SAN paths with normal paths. This is really ETS-specific, but shouldn't harm anyone else.

zsave_db(obj, redis_server, prefix, job_num)

source code 

Saves an object/function as bz2-compressed pickled data in a Redis database

Parameters:
  • obj (object or function) - The object/function to store.
  • redis_server (StrictRedis) - An open connection to the database
  • prefix (basestring) - The prefix to use for the key for this data.
  • job_num (int) - The ID of the job this data is for.

zload_db(redis_server, prefix, job_num)

source code 

Loads bz2-compressed pickled object from a Redis database

Parameters:
  • redis_server (StrictRedis) - An open connection to the database
  • prefix (basestring) - The prefix to use for the key for this data.
  • job_num (int) - The ID of the job this data is for.