Allow a jobs posted book to be none by default
Not all users of jobs and jobboards are using the associated book that accompanies a job, instead they are fine with just using the name and the details that can be provided for usage in their application. Example: http://review.openstack.org/#/c/91763/ To allow the optional usage of books with jobs (which is already supported) by default set the book to none and allow it to be provided on a as needed basis. Change-Id: I69e370a733e44c45c62177008838c259fd9c9a7c
This commit is contained in:
@@ -432,7 +432,7 @@ class ZookeeperJobBoard(jobboard.NotifyingJobBoard):
|
||||
else:
|
||||
child_proc(request)
|
||||
|
||||
def post(self, name, book, details=None):
|
||||
def post(self, name, book=None, details=None):
|
||||
|
||||
def format_posting(job_uuid):
|
||||
posting = {
|
||||
|
@@ -118,14 +118,14 @@ class JobBoard(object):
|
||||
"""
|
||||
|
||||
@abc.abstractmethod
|
||||
def post(self, name, book, details=None):
|
||||
def post(self, name, book=None, details=None):
|
||||
"""Atomically creates and posts a job to the jobboard.
|
||||
|
||||
This posting allowing others to attempt to claim that job (and
|
||||
subsequently work on that job). The contents of the provided logbook
|
||||
must provide *enough* information for others to reference to
|
||||
construct & work on the desired entries that are contained in that
|
||||
logbook.
|
||||
subsequently work on that job). The contents of the provided logbook,
|
||||
details dictionary, or name (or a mix of these) must provide *enough*
|
||||
information for consumers to reference to construct and perform that
|
||||
jobs contained work (whatever it may be).
|
||||
|
||||
Once a job has been posted it can only be removed by consuming that
|
||||
job (after that job is claimed). Any entity can post/propose jobs
|
||||
|
Reference in New Issue
Block a user