jinzhongmin / gtra Goto Github PK
View Code? Open in Web Editor NEWgoogle-translate-api golang translate 谷歌翻译 翻译 接口
License: MIT License
google-translate-api golang translate 谷歌翻译 翻译 接口
License: MIT License
Hi,感谢你写的api,我在使用中遇到需要并发执行翻译任务。代码逻辑中控制了并发10个,但是最近会频繁遇到报错如下:
panic(0x1386d40, 0xc0001cc0e0)
/usr/local/Cellar/go/1.14.5/libexec/src/runtime/panic.go:969 +0x166
github.com/jinzhongmin/gtra.gettkk(0xc0005540c6, 0xc000125d50)
/Users/jakehu/go/pkg/mod/github.com/jinzhongmin/[email protected]/gtra.go:113 +0x1bb
github.com/jinzhongmin/gtra.tk(0x13b0714, 0x6, 0x53, 0x13af6f3)
/Users/jakehu/go/pkg/mod/github.com/jinzhongmin/[email protected]/gtra.go:101 +0x26
github.com/jinzhongmin/gtra.getResult(0x13b0714, 0x6, 0x13afb75, 0x4, 0x13af4b2, 0x2, 0xc000125e20, 0x1, 0x1, 0xc000125e68, ...)
/Users/jakehu/go/pkg/mod/github.com/jinzhongmin/[email protected]/gtra.go:177 +0x25b
github.com/jinzhongmin/gtra.(*Translater).Translate(0xc000125eb0, 0x13b0714, 0x6, 0xc000125eb0, 0x1055cea, 0x13cd550, 0xc00036e000)
/Users/jakehu/go/pkg/mod/github.com/jinzhongmin/[email protected]/gtra.go:66 +0xbd
因为没有翻译成功的处理时机。我减小了并发数量,或者设置等待时间都不能根本解决这个问题,请问如何处理比较好?寻求你的建议
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.