1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22 '''
23 Grid Map provides wrappers that simplify submission and collection of jobs,
24 in a more 'pythonic' fashion.
25
26 @author: Christian Widmer
27 @author: Cheng Soon Ong
28 @author: Dan Blanchard (dblanchard@ets.org)
29
30 @var REDIS_DB: The index of the database to select on the Redis server; can be
31 overriden by setting the GRID_MAP_REDIS_DB environment variable.
32 @var REDIS_PORT: The port of the Redis server to use; can be overriden by
33 setting the GRID_MAP_REDIS_PORT environment variable.
34 @var USE_MEM_FREE: Does your cluster support specifying how much memory a job
35 will use via mem_free? Can be overriden by setting the
36 GRID_MAP_USE_MEM_FREE environment variable.
37 @var DEFAULT_QUEUE: The default job scheduling queue to use; can be overriden
38 via the GRID_MAP_DEFAULT_QUEUE environment variable.
39 @var MAX_TRIES: Maximum number of times to try to get the output of a job from
40 the Redis database before giving up and assuming the job died
41 before writing its output; can be overriden by setting the
42 GRID_MAP_MAX_TRIES environment variable.
43 @var SLEEP_TIME: Number of seconds to sleep between attempts to retrieve job
44 output from the Redis database; can be overriden by setting the
45 GRID_MAP_SLEEP_TIME environment variable.
46 '''
47
48 from __future__ import absolute_import, print_function, unicode_literals
49
50 from gridmap.job import (Job, process_jobs, grid_map, pg_map, USE_MEM_FREE,
51 DEFAULT_QUEUE, REDIS_PORT, REDIS_DB)
52 from gridmap.data import MAX_TRIES, SLEEP_TIME
53
54
55
56 __version__ = '0.9.6'
57 VERSION = tuple(int(x) for x in __version__.split('.'))
58
59
60 __all__ = ['Job', 'process_jobs', 'grid_map', 'pg_map', 'USE_MEM_FREE',
61 'DEFAULT_QUEUE', 'REDIS_DB', 'REDIS_PORT', 'MAX_TRIES', 'SLEEP_TIME']
62