通过pdb调试djcelery的celeryd
有人尝试过使用 pdb 调试 celeryd 工作程序吗?每当遇到断点(通过 pdb 运行 celeryd 或通过 pdb.set_trace() )时,我都会遇到以下错误:
Error while handling action event.
Traceback (most recent call last):
File "/home/jeeyo/workspace3/uwcr/subscriptions/tasks.py", line 79, in process_action_event
func(action_event)
File "/home/jeeyo/workspace3/uwcr/subscriptions/tasks.py", line 36, in new_user_email
send_registration_email(username, new_user.get_profile().plaintext_password)
File "/home/jeeyo/workspace3/uwcr/looers/email.py", line 18, in send_registration_email
'Your password from UWCoopRankings', user
File "/home/jeeyo/workspace3/uwcr/looers/email.py", line 61, in send_email
if isinstance(to, basestring):
File "/home/jeeyo/workspace3/uwcr/looers/email.py", line 61, in send_email
if isinstance(to, basestring):
File "/usr/lib/python2.6/bdb.py", line 46, in trace_dispatch
return self.dispatch_line(frame)
File "/usr/lib/python2.6/bdb.py", line 65, in dispatch_line
if self.quitting: raise BdbQuit
BdbQuit
对此有解决方案吗?
Have anybody tried debugging celeryd worker using pdb? Whenever a breakpoint is encountered (either by running celeryd via pdb, or by pdb.set_trace()
), I hit the following error:
Error while handling action event.
Traceback (most recent call last):
File "/home/jeeyo/workspace3/uwcr/subscriptions/tasks.py", line 79, in process_action_event
func(action_event)
File "/home/jeeyo/workspace3/uwcr/subscriptions/tasks.py", line 36, in new_user_email
send_registration_email(username, new_user.get_profile().plaintext_password)
File "/home/jeeyo/workspace3/uwcr/looers/email.py", line 18, in send_registration_email
'Your password from UWCoopRankings', user
File "/home/jeeyo/workspace3/uwcr/looers/email.py", line 61, in send_email
if isinstance(to, basestring):
File "/home/jeeyo/workspace3/uwcr/looers/email.py", line 61, in send_email
if isinstance(to, basestring):
File "/usr/lib/python2.6/bdb.py", line 46, in trace_dispatch
return self.dispatch_line(frame)
File "/usr/lib/python2.6/bdb.py", line 65, in dispatch_line
if self.quitting: raise BdbQuit
BdbQuit
Any solution to this?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我也有同样的问题。尝试使用 Celery 的远程调试器
rdb
:请参阅用户指南(链接更新2017/5)。
I had the same problem. Try using Celery's remote debugger
rdb
instead:See the user guide (link update 2017/5).