fixed python spooler memory leak
simplified the python spooler code
Merge pull request #509 from xiaost-bytedance/master

［spooler］memory leak bugfix & simplified code