cenphoenix's recent timeline updates
cenphoenix

cenphoenix

V2EX member #3408, joined on 2010-12-02 21:31:28 +08:00
cenphoenix's recent replies
支持,干的漂亮
Mar 22, 2018
Replied to a topic by MrMike PHP 想使用微服务框架来构建项目,如何操作呢?
怎么现在貌似动不动就说要上微服务,真有那么大的访问量用得上微服务吗。
Mar 1, 2018
Replied to a topic by Livid 使用指南 关于 V2EX 支持的两种发贴语法的区别
```
@shared_task
def xsum(numbers):
return sum(numbers)
```
Mar 1, 2018
Replied to a topic by yuhuang Python django 问题咨询
@yuhuang 你在 task 里面调用 Group 进行通知不行吗?象这样

@celery_app.task
def send_phone_code(user_id, verify_token, phone_number):
customer = Customer.objects.get(id=user_id)
#发送短信操作
send_message(...)
try:
# 通知任务已完成
Group('phone_verify-%s' % customer.username).send({
'text': json.dumps({
'success': True,
'msg': 'new message sent'
})
})
except Exception as e:
# 通知任务失败
Group('phone_verify-%s' % customer.username).send({
'text': json.dumps({
'success': False,
'msg': e.msg
})
})
Mar 1, 2018
Replied to a topic by yuhuang Python django 问题咨询
用 Group 是否可行?用户登录进来的时候根据用户 id 创建只有他的 Group 里,异步完成后也是根据这个 id 用 Group 进行通知
不错
May 22, 2017
Replied to a topic by Andor_Chen Python 送几本《流畅的 Python 》
求中奖
About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   5314 Online   Highest 6679   ·     Select Language
创意工作者们的社区
World is powered by solitude
VERSION: 3.9.8.5 · 15ms · UTC 07:01 · PVG 15:01 · LAX 00:01 · JFK 03:01
♥ Do have faith in what you're doing.