Overwrite elements in queue


I have a quick question. Is it possible to overwirte jobs in a queue or remove all pushed jobs? UseCase: The should always be only one job in the queue. If a new job gets pushed while there is one in the queue it should replace that one.

Kind Regards

Workaround solution is with storing the jobId and before an other is made get the storage and cancel the jobs with jobProgress.canccel().