mv queue to single instance
fix import error
use API to write queue