clearQueue() is documented as not being intended to be used outside of the installer, and really, I can't think of a use-case of where it would be useful.
Can you please explain why you're using it so I can help figure out an alternative? Interacting directly with the queue is not recommended, and the internals of how the queue works is likely going to be changing in 1.29.