mirror of
https://github.com/DanielnetoDotCom/YouPHPTube
synced 2025-10-06 03:50:04 +02:00
Update socket and remove unecessary logs
This commit is contained in:
parent
e916a87c0f
commit
2ece6fac56
4 changed files with 13 additions and 10 deletions
|
@ -90,7 +90,7 @@ if (User::canStream()) {
|
|||
continue;
|
||||
}
|
||||
var stat = stats[i];
|
||||
console.log('amILive', stat);
|
||||
//console.log('amILive', stat);
|
||||
if (stat.type == 'live' || stat.type == "LiveObject") {
|
||||
if (stat.users_id == my_users_id) {
|
||||
my_current_live_key = stat.key;
|
||||
|
@ -100,7 +100,7 @@ if (User::canStream()) {
|
|||
}
|
||||
}
|
||||
}
|
||||
console.log('amILive', IAmOnline, stats);
|
||||
//console.log('amILive', IAmOnline, stats);
|
||||
$('body').each(function() {
|
||||
var classes = $(this).attr('class').split(' ').filter(function(c) {
|
||||
return !c.startsWith('body_live_');
|
||||
|
@ -131,7 +131,7 @@ if (User::canStream()) {
|
|||
_processLiveStats_processingNow = 0;
|
||||
}, 200);
|
||||
if (typeof response !== 'undefined') {
|
||||
console.trace('processApplication add notificationLiveItemRemoveThis');
|
||||
//console.trace('processApplication add notificationLiveItemRemoveThis');
|
||||
$('.stats_app').addClass('notificationLiveItemRemoveThis');
|
||||
if (isArray(response)) {
|
||||
for (var i in response) {
|
||||
|
@ -211,7 +211,7 @@ if (User::canStream()) {
|
|||
processApplication(response.applications[i]);
|
||||
$('#' + response.applications[i].className).removeClass('notificationLiveItemRemoveThis');
|
||||
if (!response.applications[i].comingsoon) {
|
||||
console.log('processApplicationLive', response.applications[i]);
|
||||
//console.log('processApplicationLive', response.applications[i]);
|
||||
if (typeof response.applications[i].live_cleanKey !== 'undefined') {
|
||||
selector = '.liveViewStatusClass_' + response.applications[i].live_cleanKey;
|
||||
onlineLabelOnline(selector);
|
||||
|
@ -313,7 +313,7 @@ if (User::canStream()) {
|
|||
}
|
||||
var selector = '#' + notificatioID;
|
||||
$(selector).removeClass('notificationLiveItemRemoveThis');
|
||||
console.log('processApplication notificatioID ', selector);
|
||||
//console.log('processApplication notificatioID ', selector);
|
||||
if (!$(selector).length) {
|
||||
notificationHTML.attr('id', notificatioID);
|
||||
if (application.comingsoon) {
|
||||
|
@ -346,7 +346,7 @@ if (User::canStream()) {
|
|||
|
||||
var selector = '#' + id;
|
||||
$(selector).removeClass('notificationLiveItemRemoveThis');
|
||||
console.log('processApplication key ', selector);
|
||||
//console.log('processApplication key ', selector);
|
||||
if ($(selector).length) {
|
||||
//console.log('processApplication key found', id);
|
||||
return false;
|
||||
|
|
|
@ -37,7 +37,7 @@ function addTemplateFromArray(itemsArray, prepend) {
|
|||
return false;
|
||||
}
|
||||
//console.log('addTemplateFromArray', itemsArray);
|
||||
console.trace('processApplication addTemplateFromArray ', itemsArray);
|
||||
//console.trace('processApplication addTemplateFromArray ', itemsArray);
|
||||
if (!empty(itemsArray.element_id) && $('#' + (itemsArray.element_id)).length) {
|
||||
var selector = '#' + (itemsArray.element_id);
|
||||
$(selector).removeClass('notificationLiveItemRemoveThis');
|
||||
|
|
|
@ -13,6 +13,7 @@ require_once $global['systemRootPath'] . 'plugin/YPTSocket/functions.php';
|
|||
|
||||
class Message implements MessageComponentInterface {
|
||||
const MSG_TO_ALL_TIMEOUT = 5;
|
||||
static $lastMessageToAllDuration = 0;
|
||||
static $msgToAll = array();
|
||||
static $isSendingToAll = false;
|
||||
static $mem_usage;
|
||||
|
@ -401,6 +402,7 @@ class Message implements MessageComponentInterface {
|
|||
|
||||
$autoUpdateOnHTML = array_merge($info, $return);
|
||||
$obj['autoUpdateOnHTML'] = $autoUpdateOnHTML;
|
||||
$obj['lastMessageToAllDuration'] = self::$lastMessageToAllDuration;
|
||||
|
||||
//$obj['users_uri'] = $return['users_uri'];
|
||||
$obj['resourceId'] = $resourceId;
|
||||
|
@ -517,7 +519,8 @@ class Message implements MessageComponentInterface {
|
|||
}
|
||||
$this->msgToResourceId($msg, $client['resourceId'], $type, $totals);
|
||||
}
|
||||
$end = number_format(microtime(true) - $start, 4);
|
||||
self::$lastMessageToAllDuration = microtime(true) - $start;
|
||||
$end = number_format(self::$lastMessageToAllDuration, 4);
|
||||
_log_message("msgToAll FROM {$type} Total Clients: " . count($rows) . " in {$end} seconds");
|
||||
}
|
||||
|
||||
|
|
|
@ -47,7 +47,7 @@ class YPTSocket extends PluginAbstract
|
|||
|
||||
public static function getServerVersion()
|
||||
{
|
||||
return "7.1";
|
||||
return "7.2";
|
||||
}
|
||||
|
||||
public function updateScript()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue