batch_job

Most applications need to perform some scheduled jobs to process information. Users need to be able to monitor the functioning of those scheduled jobs.

These classes provide the means to store the result of batch jobs to enable the user to review or plan them.

class camelot.model.batch_job.BatchJob(**kwargs)[source]

Information the batch job that is planned, running or has run

../../_images/new_view_batchjob.png

Fields :

  • status : INTEGER, required
  • host : VARCHAR(256), required
  • date : <class ‘sqlalchemy.types.DateTime’>, required
  • message : TEXT, not required
  • type : refers to BatchJobType
add_exception_to_message(exception)[source]

If an exception occurs in a batch job, this method can be used to add the stack trace of the exception to the message

add_strings_to_message(strings)[source]
Parameters:strings – a list or generator of strings
is_canceled()[source]

Verifies if this Batch Job is canceled. Returns True if it is. This verification is done without using the ORM, so the verification has no impact on the current session or the objects itself. This method is thus suited to call inside a running batch job to verifiy if another user has canceled the running job.

Returns:True or False
class camelot.model.batch_job.BatchJobType(**kwargs)[source]
The type of batch job, the user will be able to filter his
jobs based on their type. A type might be ‘Create management reports’
../../_images/new_view_batchjobtype.png

Fields :

  • name : VARCHAR(256), required
  • parent : refers to BatchJobType

Previous topic

authentication

Next topic

fixture

This Page


Comments
blog comments powered by Disqus