@@ -369,7 +369,7 @@ async def chained_middleware(ctx: C, nxt: Optional[Middleware[C]] = None) -> C:
369
369
370
370
371
371
class JobRequest :
372
- """Represents a translated Job, from a Job Definition, forwarded from the Nitric Runtime Server."""
372
+ """Represents a job task forwarded from the Nitric Runtime Server."""
373
373
374
374
data : dict [str , Any ]
375
375
@@ -379,28 +379,28 @@ def __init__(self, data: dict[str, Any]):
379
379
380
380
381
381
class JobResponse :
382
- """Represents the response to a trigger from a Job submission as a result of a SubmitJob call ."""
382
+ """Represents the response to a job task, indicating the result."""
383
383
384
384
def __init__ (self , success : bool = True ):
385
385
"""Construct a new EventResponse."""
386
386
self .success = success
387
387
388
388
389
389
class JobContext :
390
- """Represents the full request/response context for an Event based trigger."""
390
+ """Represents the full request/response context for a Job task trigger."""
391
391
392
392
def __init__ (self , request : JobRequest , response : Optional [JobResponse ] = None ):
393
- """Construct a new EventContext ."""
393
+ """Construct a new JobContext ."""
394
394
self .req = request
395
395
self .res = response if response else JobResponse ()
396
396
397
397
@staticmethod
398
398
def _from_request (msg : BatchServerMessage ) -> "JobContext" :
399
- """Construct a new EventContext from a Topic trigger from the Nitric Membrane ."""
399
+ """Construct a new JobContext from a Job trigger from the Nitric Server ."""
400
400
return JobContext (request = JobRequest (data = dict_from_struct (msg .job_request .data .struct )))
401
401
402
402
def to_response (self ) -> BatchClientMessage :
403
- """Construct a EventContext for the Nitric Membrane from this context object."""
403
+ """Construct a JobContext for the Nitric Server from this context object."""
404
404
return BatchClientMessage (job_response = BatchJobResponse (success = self .res .success ))
405
405
406
406
0 commit comments