diff --git a/app.py b/app.py index 839d29a..792f9c6 100644 --- a/app.py +++ b/app.py @@ -467,7 +467,7 @@ def consume_stream(): bark_push('%s 添加成功' % good_name, '条形码 %s' % msg['data']) else: logger.error(f"Failed to process message: {msg['data']} {resp}") - bark_push('商品添加失败', '条形码 %s' % msg['data']) + bark_push('商品添加失败', '条形码 %s \n %s' % (msg['data'], resp.get('message'))) else: resp, status_code, good_name = consume_product_by_barcode(msg['data']) if status_code == 200: @@ -475,7 +475,7 @@ def consume_stream(): bark_push('%s 消耗成功' % good_name, '条形码 %s' % msg['data']) else: logger.error(f"Failed to process message: {msg['data']} {resp}") - bark_push('商品消耗失败', '条形码 %s' % msg['data']) + bark_push('商品消耗失败', '条形码 %s \n' % (msg['data'], resp.get('message'))) if consume_product_flag_key: r.delete(consume_product_flag_key)