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;
|
continue;
|
||||||
}
|
}
|
||||||
var stat = stats[i];
|
var stat = stats[i];
|
||||||
console.log('amILive', stat);
|
//console.log('amILive', stat);
|
||||||
if (stat.type == 'live' || stat.type == "LiveObject") {
|
if (stat.type == 'live' || stat.type == "LiveObject") {
|
||||||
if (stat.users_id == my_users_id) {
|
if (stat.users_id == my_users_id) {
|
||||||
my_current_live_key = stat.key;
|
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() {
|
$('body').each(function() {
|
||||||
var classes = $(this).attr('class').split(' ').filter(function(c) {
|
var classes = $(this).attr('class').split(' ').filter(function(c) {
|
||||||
return !c.startsWith('body_live_');
|
return !c.startsWith('body_live_');
|
||||||
|
@ -131,7 +131,7 @@ if (User::canStream()) {
|
||||||
_processLiveStats_processingNow = 0;
|
_processLiveStats_processingNow = 0;
|
||||||
}, 200);
|
}, 200);
|
||||||
if (typeof response !== 'undefined') {
|
if (typeof response !== 'undefined') {
|
||||||
console.trace('processApplication add notificationLiveItemRemoveThis');
|
//console.trace('processApplication add notificationLiveItemRemoveThis');
|
||||||
$('.stats_app').addClass('notificationLiveItemRemoveThis');
|
$('.stats_app').addClass('notificationLiveItemRemoveThis');
|
||||||
if (isArray(response)) {
|
if (isArray(response)) {
|
||||||
for (var i in response) {
|
for (var i in response) {
|
||||||
|
@ -211,7 +211,7 @@ if (User::canStream()) {
|
||||||
processApplication(response.applications[i]);
|
processApplication(response.applications[i]);
|
||||||
$('#' + response.applications[i].className).removeClass('notificationLiveItemRemoveThis');
|
$('#' + response.applications[i].className).removeClass('notificationLiveItemRemoveThis');
|
||||||
if (!response.applications[i].comingsoon) {
|
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') {
|
if (typeof response.applications[i].live_cleanKey !== 'undefined') {
|
||||||
selector = '.liveViewStatusClass_' + response.applications[i].live_cleanKey;
|
selector = '.liveViewStatusClass_' + response.applications[i].live_cleanKey;
|
||||||
onlineLabelOnline(selector);
|
onlineLabelOnline(selector);
|
||||||
|
@ -313,7 +313,7 @@ if (User::canStream()) {
|
||||||
}
|
}
|
||||||
var selector = '#' + notificatioID;
|
var selector = '#' + notificatioID;
|
||||||
$(selector).removeClass('notificationLiveItemRemoveThis');
|
$(selector).removeClass('notificationLiveItemRemoveThis');
|
||||||
console.log('processApplication notificatioID ', selector);
|
//console.log('processApplication notificatioID ', selector);
|
||||||
if (!$(selector).length) {
|
if (!$(selector).length) {
|
||||||
notificationHTML.attr('id', notificatioID);
|
notificationHTML.attr('id', notificatioID);
|
||||||
if (application.comingsoon) {
|
if (application.comingsoon) {
|
||||||
|
@ -346,7 +346,7 @@ if (User::canStream()) {
|
||||||
|
|
||||||
var selector = '#' + id;
|
var selector = '#' + id;
|
||||||
$(selector).removeClass('notificationLiveItemRemoveThis');
|
$(selector).removeClass('notificationLiveItemRemoveThis');
|
||||||
console.log('processApplication key ', selector);
|
//console.log('processApplication key ', selector);
|
||||||
if ($(selector).length) {
|
if ($(selector).length) {
|
||||||
//console.log('processApplication key found', id);
|
//console.log('processApplication key found', id);
|
||||||
return false;
|
return false;
|
||||||
|
|
|
@ -37,7 +37,7 @@ function addTemplateFromArray(itemsArray, prepend) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
//console.log('addTemplateFromArray', itemsArray);
|
//console.log('addTemplateFromArray', itemsArray);
|
||||||
console.trace('processApplication addTemplateFromArray ', itemsArray);
|
//console.trace('processApplication addTemplateFromArray ', itemsArray);
|
||||||
if (!empty(itemsArray.element_id) && $('#' + (itemsArray.element_id)).length) {
|
if (!empty(itemsArray.element_id) && $('#' + (itemsArray.element_id)).length) {
|
||||||
var selector = '#' + (itemsArray.element_id);
|
var selector = '#' + (itemsArray.element_id);
|
||||||
$(selector).removeClass('notificationLiveItemRemoveThis');
|
$(selector).removeClass('notificationLiveItemRemoveThis');
|
||||||
|
|
|
@ -13,6 +13,7 @@ require_once $global['systemRootPath'] . 'plugin/YPTSocket/functions.php';
|
||||||
|
|
||||||
class Message implements MessageComponentInterface {
|
class Message implements MessageComponentInterface {
|
||||||
const MSG_TO_ALL_TIMEOUT = 5;
|
const MSG_TO_ALL_TIMEOUT = 5;
|
||||||
|
static $lastMessageToAllDuration = 0;
|
||||||
static $msgToAll = array();
|
static $msgToAll = array();
|
||||||
static $isSendingToAll = false;
|
static $isSendingToAll = false;
|
||||||
static $mem_usage;
|
static $mem_usage;
|
||||||
|
@ -401,7 +402,8 @@ class Message implements MessageComponentInterface {
|
||||||
|
|
||||||
$autoUpdateOnHTML = array_merge($info, $return);
|
$autoUpdateOnHTML = array_merge($info, $return);
|
||||||
$obj['autoUpdateOnHTML'] = $autoUpdateOnHTML;
|
$obj['autoUpdateOnHTML'] = $autoUpdateOnHTML;
|
||||||
|
$obj['lastMessageToAllDuration'] = self::$lastMessageToAllDuration;
|
||||||
|
|
||||||
//$obj['users_uri'] = $return['users_uri'];
|
//$obj['users_uri'] = $return['users_uri'];
|
||||||
$obj['resourceId'] = $resourceId;
|
$obj['resourceId'] = $resourceId;
|
||||||
$obj['users_id_online'] = dbGetUniqueUsers();
|
$obj['users_id_online'] = dbGetUniqueUsers();
|
||||||
|
@ -517,7 +519,8 @@ class Message implements MessageComponentInterface {
|
||||||
}
|
}
|
||||||
$this->msgToResourceId($msg, $client['resourceId'], $type, $totals);
|
$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");
|
_log_message("msgToAll FROM {$type} Total Clients: " . count($rows) . " in {$end} seconds");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -47,7 +47,7 @@ class YPTSocket extends PluginAbstract
|
||||||
|
|
||||||
public static function getServerVersion()
|
public static function getServerVersion()
|
||||||
{
|
{
|
||||||
return "7.1";
|
return "7.2";
|
||||||
}
|
}
|
||||||
|
|
||||||
public function updateScript()
|
public function updateScript()
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue