How to use the queue.slow_ul_threshold function in queue

To help you get started, we’ve selected a few queue examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github hadouken / hadouken / src / WebUI / webui.js View on Github external
groups.lbl["lbl_" + encodeID(lbl)] = 1;
			});
		}

		// Categories: Downloading/Completed
		if (tor[CONST.TORRENT_PROGRESS] < 1000) {
			groups.cat["cat_dls"] = 1;
		}
		else {
			groups.cat["cat_com"] = 1;
		}

		// Categories: Active/Inactive
		if (
			(tor[CONST.TORRENT_DOWNSPEED] > (this.settings["queue.slow_dl_threshold"] || 103)) ||
			(tor[CONST.TORRENT_UPSPEED] > (this.settings["queue.slow_ul_threshold"] || 103))
		) {
			groups.cat["cat_act"] = 1;
		}
		else {
			groups.cat["cat_iac"] = 1;
		}

		// Update group counts
		// TODO: Move this elsewhere!
		(function(groups, oldGroups) {
			if (!oldGroups) {
				Object.each(groups.cat, function(_, cat) {
					++this.categories[cat];
				}, this);
			}
			else {
github hadouken / hadouken / src / WebUI / Js / webui.js View on Github external
// dl / complete
        
        if(tor[CONST.TORRENT_COMPLETE])
        {
            groups.cat["cat_com"] = 1;
        }
        else
        {
            groups.cat["cat_dls"] = 1;
        }
        
        // active / inactive
        
        if((tor[CONST.TORRENT_DOWNSPEED] > (this.settings["queue.slow_dl_threshold"] || 103)) ||
           (tor[CONST.TORRENT_UPSPEED] > (this.settings["queue.slow_ul_threshold"] || 103)))
        {
            groups.cat["cat_act"] = 1;
        }
        else
        {
            groups.cat["cat_iac"] = 1;
        }
        
        // update group counts
        // TODO: Move this elsewhere!
        (function(groups, oldGroups) {
            if (!oldGroups)
            {
                Object.each(groups.cat, function(_, cat)
                {
                    ++this.categories[cat];