前边我们分别讲了Batch Apex,Future方法,他们都是异步进程,都可以在自己的线程运行,除了上述两个方法,还有一种异步进程处理方式,就是QueueableApex,它是通过使用可排队接口控制异步 Apex进程。使用此接口,可以将作业添加到队列并对其进行监视。与使用Future方法相比,使用该接口是运行异步Apex代码
(for example, from a batch apex job), you can add only one job to the queue with system.enqueuejob . to check how many queueable jobs have been added in one transaction, call limits.getqueueablejobs() . because no limit is enforced on the depth of chained jobs, you can chain one ...
(for example, from a batch apex job), you can add only one job to the queue with system.enqueuejob . to check how many queueable jobs have been added in one transaction, call limits.getqueueablejobs() . because no limit is enforced on the depth of chained jobs, you can chain one ...