!C99Shell v. 2.5 [PHP 8 Update] [24.05.2025]!

Software: Apache/2.4.41 (Ubuntu). PHP/8.0.30 

uname -a: Linux apirnd 5.4.0-204-generic #224-Ubuntu SMP Thu Dec 5 13:38:28 UTC 2024 x86_64 

uid=33(www-data) gid=33(www-data) groups=33(www-data) 

Safe-mode: OFF (not secure)

/var/www/html/proxy_server/node_modules/bull-board/dist/routes/handlers/   drwxr-xr-x
Free 13.27 GB of 57.97 GB (22.89%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Self remove    Logout    


Viewing file:     queues.js (2.48 KB)      -rw-r--r--
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.queuesHandler = void 0;
const redis_info_1 = require("redis-info");
const metrics = [
    'redis_version',
    'used_memory',
    'mem_fragmentation_ratio',
    'connected_clients',
    'blocked_clients',
];
const getStats = async (queue) => {
    const redisInfoRaw = await queue.getRedisInfo();
    const redisInfo = redis_info_1.parse(redisInfoRaw);
    const validMetrics = metrics.reduce((acc, metric) => {
        if (redisInfo[metric]) {
            acc[metric] = redisInfo[metric];
        }
        return acc;
    }, {});
    validMetrics.total_system_memory = redisInfo.total_system_memory || redisInfo.maxmemory;
    return validMetrics;
};
const formatJob = (job, queue) => {
    const jobProps = job.toJSON();
    return {
        id: jobProps.id,
        timestamp: jobProps.timestamp,
        processedOn: jobProps.processedOn,
        finishedOn: jobProps.finishedOn,
        progress: jobProps.progress,
        attempts: jobProps.attemptsMade,
        delay: job.opts.delay,
        failedReason: jobProps.failedReason,
        stacktrace: jobProps.stacktrace ? jobProps.stacktrace.filter(Boolean) : [],
        opts: jobProps.opts,
        data: queue.format('data', jobProps.data),
        name: jobProps.name,
        returnValue: queue.format('returnValue', jobProps.returnvalue),
    };
};
const statuses = ['active', 'completed', 'delayed', 'failed', 'paused', 'waiting'];
const getDataForQueues = async (bullBoardQueues, req) => {
    const query = req.query || {};
    const pairs = [...bullBoardQueues.entries()];
    if (pairs.length == 0) {
        return {
            stats: {},
            queues: [],
        };
    }
    const queues = await Promise.all(pairs.map(async ([name, queue]) => {
        const counts = await queue.getJobCounts(...statuses);
        const status = query[name] === 'latest' ? statuses : query[name];
        const jobs = await queue.getJobs(status, 0, 10);
        return {
            name,
            counts: counts,
            jobs: jobs.filter(Boolean).map((job) => formatJob(job, queue)),
            readOnlyMode: queue.readOnlyMode,
        };
    }));
    const stats = await getStats(pairs[0][1]);
    return {
        stats,
        queues,
    };
};
const queuesHandler = async (req, res) => {
    const { bullBoardQueues } = req.app.locals;
    res.json(await getDataForQueues(bullBoardQueues, req));
};
exports.queuesHandler = queuesHandler;
//# sourceMappingURL=queues.js.map

:: Command execute ::

Enter:
 
Select:
 

:: Search ::
  - regexp 

:: Upload ::
 
[ Read-Only ]

:: Make Dir ::
 
[ Read-Only ]
:: Make File ::
 
[ Read-Only ]

:: Go Dir ::
 
:: Go File ::
 

--[ c99shell v. 2.5 [PHP 8 Update] [24.05.2025] | Generation time: 0.0047 ]--