• mosotws

    (@mosotws)


    queue.js

    jQuery(document).ready(function($){
        checkQueue = function() {
            $.ajax({
                url : wpmf_ajaxurl,
                type : 'POST',
                data : {
                    action: 'wpmfs_queue',
                },
                beforeSend : function(){
                    $('#wp-admin-bar-wpmfs-topbar span.wpmfs').addClass('wpmfs-querying');
                },
                success : function(data){
                    data = JSON.parse(data);
    
                    $('#wp-admin-bar-wpmfs-topbar span.wpmfs').removeClass('wpmfs-orange wpmfs-green');
                    if (data.queue_length > 0) {
                        $('#wp-admin-bar-wpmfs-topbar span.wpmfs').addClass('wpmfs-orange');
                    } else {
                        $('#wp-admin-bar-wpmfs-topbar span.wpmfs').addClass('wpmfs-green');
                    }
                    $('.wpmfs-queue').html(data.queue_length);
                    $('.wpmfs-queue').html(data.queue_length);
                    $('#wp-admin-bar-wpmfs-topbar').attr('title', data.title);
                },
                complete: function(){
                    $('#wp-admin-bar-wpmfs-topbar span.wpmfs').removeClass('wpmfs-querying');
                }
            });
        };
        setTimeout(checkQueue, 1000)
        setInterval(checkQueue, 10 * 1000);
    
        // Initialize for check queue click
        $('#wp-admin-bar-wpmfs-topbar a').click(function(e){
            e.preventDefault();
            checkQueue();
        });
    });

    setInterval(checkQueue, 10 * 1000);

    Request every 10 seconds. During long-term work, a lot of ajax requests accumulate in the admin panel.

    • This topic was modified 4 years ago by mosotws.
Viewing 4 replies - 1 through 4 (of 4 total)
  • Luke Cavanagh

    (@lukefiretoss)

    Noticed the exact same issue on a customers site.

    Plugin Author dbarrere

    (@dbarrere)

    Hi,

    I’m sorry, it seems like I missed the first post.

    Okay, I could improve this by waiting the query to actually finish before starting the next timer. It will avoid the accumulation of queries.
    I can also increase the timer.

    Will try to do that when I have spare time.

    Best regards

    blendjasper

    (@blendjasper)

    I’m having the same issue. I submitted a support ticket (#3056Problem With Amazon Cloud Offload) and I would appreciate an update as it takes down the server. I’m stuck in limbo as the sync process is not complete so I have broken images on the site. I have a table called wp_ju_queue with 9.2 million records at the moment. I’ve turned off cron and the heartbeat at the moment in order to stop the sync process.

    Plugin Author dbarrere

    (@dbarrere)

    Hi @blendjasper,
    I’m sorry but you’re asking for support for another plugin.
    WP Media Folder without the S is from JoomUnited’s company, please submit a support ticket on their side so they can check it directly with you.

    Best regards

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘The plugin overloads the CPU.’ is closed to new replies.