Queueable Apex Flashcards
What is Queueable Apex used for?
to submit jobs for async processing
What are 3 benefits queueable has over future methods?
queueable allows custom Apex classes and sObjects
You can monitor the completion of a queueable job
You can chain one job to from a running job
How many jobs can be chained from a running job?
1
How can you monitor a queueable job?
query the AsyncApexJob based on the job id returned with the job was enqueued.
Why should future be used instead of queuable?
when the execution of the method is sometimes synchronous and sometimes asynchronous.
What must be implemented for a class to be Queueable?
The Queueable Interface
t/f - functionally, queueable and future are the same.
true
How is a queueable job added to the queue?
System.enqueueJob
How many queueables can be added to a single call?
50
How can we ensure the queuable process runs within the test method?
Test.starttest();
System.enqueuejob();
Test.stoptest()
How many child jobs can exist for each parent Queuable job?
1
What is the limit enforced on the depth of chained jobs?
No limit is enforced.