doc fixes
This commit is contained in:
+6
-1
@@ -169,9 +169,14 @@ class JobGraph(object):
|
||||
self.db = db
|
||||
|
||||
def add_deps(self, task_parent, task_child):
|
||||
"""Creates a dependency between task_parent and task_child"""
|
||||
self.db.scheduler_task_deps.insert(task_parent=task_parent, task_child=task_child, job_name=self.job_name)
|
||||
|
||||
def validate(self, job_name):
|
||||
"""Validates if all tasks job_name can be completed, i.e. there
|
||||
are no mutual dependencies among tasks.
|
||||
Commits at the end if successfull, or it rollbacks the entire
|
||||
transaction. Handle with care!"""
|
||||
db = self.db
|
||||
sd = db.scheduler_task_deps
|
||||
if job_name:
|
||||
@@ -1380,7 +1385,7 @@ class Scheduler(MetaScheduler):
|
||||
return rtn
|
||||
|
||||
def get_workers(self, only_ticker=False):
|
||||
""" Returns a dict holding worker_name : {**columns}
|
||||
""" Returns a dict holding `worker_name : {**columns}`
|
||||
representing all "registered" workers
|
||||
only_ticker returns only the workers running as a TICKER,
|
||||
if there are any
|
||||
|
||||
+3
-1
@@ -4425,8 +4425,10 @@ def geocode(address):
|
||||
return (0.0, 0.0)
|
||||
|
||||
|
||||
def reverse_geocode(lat, lng, lang=current.T.accepted_language):
|
||||
def reverse_geocode(lat, lng, lang=None):
|
||||
""" Try to get an approximate address for a given latitude, longitude. """
|
||||
if not lang:
|
||||
lang = current.T.accepted_language
|
||||
try:
|
||||
return json_parser.loads(fetch('http://maps.googleapis.com/maps/api/geocode/json?latlng=%(lat)s,%(lng)s&language=%(lang)s' % locals()))['results'][0]['formatted_address']
|
||||
except:
|
||||
|
||||
Reference in New Issue
Block a user