diff --git a/mutalyzer/services/rpc.py b/mutalyzer/services/rpc.py index a256831f1de687878e26fa1ecad06f23e256f94c..8281da387b4049ffbbdcc7d1410d07cf00d4db66 100644 --- a/mutalyzer/services/rpc.py +++ b/mutalyzer/services/rpc.py @@ -71,14 +71,20 @@ class MutalyzerService(ServiceBase): super(MutalyzerService, self).__init__(environ) #__init__ - @srpc(Mandatory.ByteArray, Unicode, Unicode, _returns=Unicode) - def submitBatchJob(data, process='NameChecker', argument=''): + @srpc(Mandatory.ByteArray, Unicode, Unicode, Unicode, _returns=Unicode) + def submitBatchJob(data, process='NameChecker', argument='', email=None): """ Submit a batch job. Input and output file formats for batch jobs are explained on the website <https://mutalyzer.nl/batch>. + Batch jobs are processed using round-robin scheduling grouped by email + address. Per email address, jobs are processed sequentially in order + of submission. Jobs with no email address specified end up in a shared + group. This means your job is likely to be processed sooner if you + provide an email address. + On error an exception is raised: - detail: Human readable description of the error. - faultstring: A code to indicate the type of error. @@ -90,6 +96,8 @@ class MutalyzerService(ServiceBase): (default), SyntaxChecker, PositionConverter, SnpConverter. @arg argument: Additional argument. Currently only used if batch_type is PositionConverter, denoting the human genome build. + @arg email: Optional email address. Notification of job completion + will be sent to this address. @return: Batch job identifier. """ @@ -139,7 +147,7 @@ class MutalyzerService(ServiceBase): if job is None: raise Fault('EPARSE', 'Could not parse input file, please check your file format.') - result_id = scheduler.addJob('job@webservice', job, columns, + result_id = scheduler.addJob(email or 'job@webservice', job, columns, batch_types[process], argument) return result_id