fanyi
This commit is contained in:
@@ -43,11 +43,11 @@ class TranslatorService
|
||||
return $location;
|
||||
}
|
||||
|
||||
public function queue($field,$sourceLang,$type,$id) {
|
||||
public function queue($field,$sourceLang,$type,$id,$toLang) {
|
||||
// 队列名
|
||||
$queue = 'translator';
|
||||
// 数据,可以直接传数组,无需序列化
|
||||
$data = ['entityType' => $type, 'sourceFields' => $field, 'sourceLang' => $sourceLang, 'locale' => 'hello', 'id' => $id];
|
||||
$data = ['entityType' => $type, 'sourceFields' => $field, 'sourceLang' => $sourceLang, 'locale' => 'hello', 'id' => $id, 'toLang' => $toLang];
|
||||
// 投递消息
|
||||
Redis::send($queue, $data);
|
||||
return true;
|
||||
|
||||
Reference in New Issue
Block a user