Changed logs Nginx, count unique description

This commit is contained in:
zeldaroot 2020-01-31 01:29:06 +02:00
parent b74551fce8
commit 23c4ac9fd5
2 changed files with 23 additions and 8 deletions

View file

@ -1674,8 +1674,6 @@ docker_reload() {
docker_logs() {
SHOW_ERR_LOGS=$(pm2 logs --err --lines 50 --nostream | curl -s -F 'clbin=<-' https://clbin.com)
SHOW_OUT_LOGS=$(pm2 logs --out --lines 50 --nostream | curl -s -F 'clbin=<-' https://clbin.com)
SHOW_NGINX_LOGS=$(tail -n50 /var/log/nginx/*.log | curl -s -F 'clbin=<-' https://clbin.com)
_br
_header "ERR LOGS"
_content
_content "${SHOW_ERR_LOGS}"
@ -1686,11 +1684,6 @@ docker_logs() {
_content "${SHOW_OUT_LOGS}"
_content
_s
_header "NGINX LOGS"
_content
_content "${SHOW_NGINX_LOGS}"
_content
_s
}
docker_zero() {
sed -i "s/xmlpipe_command =.*/xmlpipe_command =/" "/home/${CP_DOMAIN}/config/production/sphinx/sphinx.conf"
@ -2271,7 +2264,13 @@ while [ "${WHILE}" -lt "2" ]; do
fi
_content
_line
docker exec "${CP_DOMAIN_}" /usr/bin/cinemapress container logs
_br
_header "NGINX LOGS"
_content
_content "$(tail -n50 /var/log/nginx/*.log | curl -s -F 'clbin=<-' https://clbin.com)"
_content
_s
docker exec -t "${CP_DOMAIN_}" /usr/bin/cinemapress container logs
exit 0
;;
"clear_vps"|"clean_vps"|"flush_vps"|"clear_all"|"clean_all"|"flush_all" )

View file

@ -75,6 +75,9 @@ function tryParseJSON(jsonString) {
return {};
}
var indexed = 0;
var no_description_indexed = 0;
async.series(
[
function(callback) {
@ -111,6 +114,17 @@ async.series(
delete movie.imdb_vote;
delete movie.all_movies;
movie.id = movie.kp_id;
if (!movie.description) {
var custom = movie.custom ? JSON.parse(movie.custom) : {};
if (custom.unique) {
no_description_indexed++;
}
//custom.unique = false;
//movie.custom = JSON.stringify(custom.unique);
}
if (/("unique":true|"unique":"true")/i.test(movie.custom)) {
indexed++;
}
CP_save.save(movie, 'rt', function(err, result) {
if (old && old !== domain) {
console.log(
@ -137,6 +151,8 @@ async.series(
);
},
function() {
console.log('INDEXED: ', indexed);
console.log('NO DESCRIPTION INDEXED: ', no_description_indexed);
return callback();
}
);