Toggle navigation
Toggle navigation
This project
Loading...
Sign in
web
/
yoho-live
·
Commits
Go to a project
GitLab
Go to group
Project
Activity
Files
Commits
Pipelines
0
Builds
0
Graphs
Milestones
Issues
0
Merge Requests
0
Members
Labels
Wiki
Forks
Network
Create a new issue
Download as
Email Patches
Plain Diff
Browse Files
Authored by
xiaofeng.yao@yoho.cn
8 years ago
Commit
1658e6d11081a13ca9778a62f74db7512f8fb36d
1 parent
bac82ad7
直播打日志
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
3 deletions
common/lib/YohonowApi/Request.php
common/models/Video.php
common/lib/YohonowApi/Request.php
View file @
1658e6d
...
...
@@ -58,7 +58,9 @@ class Request
private
function
_send
(
$uri
,
array
$data
)
{
file_put_contents
(
"/tmp/yoholive.log"
,
date
(
'Y-m-d H:i:s'
)
.
"|request yohonow,url:"
.
$this
->
makeUrl
(
$uri
,
$data
),
FILE_APPEND
);
$response
=
Curl
::
get
(
$this
->
makeUrl
(
$uri
,
$data
));
file_put_contents
(
"/tmp/yoholive.log"
,
date
(
'Y-m-d H:i:s'
)
.
"|request yohonow,result:"
.
var_export
(
$response
,
true
),
FILE_APPEND
);
$response
=
json_decode
(
$response
,
true
);
if
(
$response
[
'code'
]
==
self
::
$success
)
{
return
true
;
...
...
common/models/Video.php
View file @
1658e6d
...
...
@@ -122,10 +122,11 @@ class Video extends \yii\db\ActiveRecord
->
from
(
'tbl_room'
)
->
where
([
'room_id'
=>
$room_id
])
->
one
();
if
(
!
$room
[
'status'
]){
throw
new
\Exception
(
"该房间已被禁用,请联系管理员"
);
}
if
(
1
)
{
//
if (1) {
$this
->
setAttributes
([
'app'
=>
$room
[
'app'
],
'task_id'
=>
0
,
//$ret['task_id']
...
...
@@ -171,9 +172,9 @@ class Video extends \yii\db\ActiveRecord
/*------------清除弹幕相关redis--------------*/
$transaction
->
commit
();
return
true
;
}
else
{
/*
} else {
throw new \Exception(QcloudApiClient::self()->error());
}
}
*/
}
catch
(
\Exception
$e
)
{
$transaction
->
rollBack
();
throw
new
\Exception
(
$e
->
getMessage
());
...
...
Please
register
or
login
to post a comment