mirror of
https://github.com/9001/copyparty.git
synced 2025-08-18 09:22:31 -06:00
remove dead code
This commit is contained in:
parent
2c4b4ab928
commit
eed82dbb54
|
@ -668,12 +668,6 @@ class Up2k(object):
|
||||||
cur.close()
|
cur.close()
|
||||||
|
|
||||||
def _start_mpool(self):
|
def _start_mpool(self):
|
||||||
if WINDOWS and False:
|
|
||||||
nah = open(os.devnull, "wb")
|
|
||||||
wmic = "processid={}".format(os.getpid())
|
|
||||||
wmic = ["wmic", "process", "where", wmic, "call", "setpriority"]
|
|
||||||
sp.call(wmic + ["below normal"], stdout=nah, stderr=nah)
|
|
||||||
|
|
||||||
# mp.pool.ThreadPool and concurrent.futures.ThreadPoolExecutor
|
# mp.pool.ThreadPool and concurrent.futures.ThreadPoolExecutor
|
||||||
# both do crazy runahead so lets reinvent another wheel
|
# both do crazy runahead so lets reinvent another wheel
|
||||||
nw = os.cpu_count() if hasattr(os, "cpu_count") else 4
|
nw = os.cpu_count() if hasattr(os, "cpu_count") else 4
|
||||||
|
@ -698,12 +692,6 @@ class Up2k(object):
|
||||||
|
|
||||||
mpool.join()
|
mpool.join()
|
||||||
done = self._flush_mpool(wcur)
|
done = self._flush_mpool(wcur)
|
||||||
if WINDOWS and False:
|
|
||||||
nah = open(os.devnull, "wb")
|
|
||||||
wmic = "processid={}".format(os.getpid())
|
|
||||||
wmic = ["wmic", "process", "where", wmic, "call", "setpriority"]
|
|
||||||
sp.call(wmic + ["below normal"], stdout=nah, stderr=nah)
|
|
||||||
|
|
||||||
return done
|
return done
|
||||||
|
|
||||||
def _tag_thr(self, q):
|
def _tag_thr(self, q):
|
||||||
|
|
|
@ -287,15 +287,6 @@ function U2pvis(act, btns) {
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
this.bzw_log = function (first, last) {
|
|
||||||
console.log("first %d head %d tail %d last %d", first, this.head, this.tail, last);
|
|
||||||
var trs = document.querySelectorAll('#u2tab>tbody>tr'), msg = [];
|
|
||||||
for (var a = 0; a < trs.length; a++)
|
|
||||||
msg.push(trs[a].getAttribute('id'));
|
|
||||||
|
|
||||||
console.log(msg.join(' '));
|
|
||||||
}
|
|
||||||
|
|
||||||
this.bzw = function () {
|
this.bzw = function () {
|
||||||
var first = document.querySelector('#u2tab>tbody>tr:first-child');
|
var first = document.querySelector('#u2tab>tbody>tr:first-child');
|
||||||
if (!first)
|
if (!first)
|
||||||
|
@ -304,7 +295,6 @@ function U2pvis(act, btns) {
|
||||||
var last = document.querySelector('#u2tab>tbody>tr:last-child');
|
var last = document.querySelector('#u2tab>tbody>tr:last-child');
|
||||||
first = parseInt(first.getAttribute('id').slice(1));
|
first = parseInt(first.getAttribute('id').slice(1));
|
||||||
last = parseInt(last.getAttribute('id').slice(1));
|
last = parseInt(last.getAttribute('id').slice(1));
|
||||||
//this.bzw_log(first, last);
|
|
||||||
|
|
||||||
while (this.head - first > this.wsz) {
|
while (this.head - first > this.wsz) {
|
||||||
var obj = ebi('f' + (first++));
|
var obj = ebi('f' + (first++));
|
||||||
|
@ -315,8 +305,6 @@ function U2pvis(act, btns) {
|
||||||
if (!obj)
|
if (!obj)
|
||||||
this.addrow(last);
|
this.addrow(last);
|
||||||
}
|
}
|
||||||
//this.bzw_log(first, last);
|
|
||||||
//console.log('--');
|
|
||||||
};
|
};
|
||||||
|
|
||||||
this.drawcard = function (cat) {
|
this.drawcard = function (cat) {
|
||||||
|
@ -758,17 +746,6 @@ function up2k_init(have_crypto) {
|
||||||
|
|
||||||
mutex = true;
|
mutex = true;
|
||||||
while (true) {
|
while (true) {
|
||||||
if (false) {
|
|
||||||
ebi('srv_info').innerHTML =
|
|
||||||
new Date().getTime() + ", " +
|
|
||||||
st.todo.hash.length + ", " +
|
|
||||||
st.todo.handshake.length + ", " +
|
|
||||||
st.todo.upload.length + ", " +
|
|
||||||
st.busy.hash.length + ", " +
|
|
||||||
st.busy.handshake.length + ", " +
|
|
||||||
st.busy.upload.length;
|
|
||||||
}
|
|
||||||
|
|
||||||
var is_busy = 0 !=
|
var is_busy = 0 !=
|
||||||
st.todo.hash.length +
|
st.todo.hash.length +
|
||||||
st.todo.handshake.length +
|
st.todo.handshake.length +
|
||||||
|
@ -907,19 +884,6 @@ function up2k_init(have_crypto) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function ensure_rendered(func) {
|
|
||||||
var hidden = false;
|
|
||||||
var keys = ['hidden', 'msHidden', 'webkitHidden'];
|
|
||||||
for (var a = 0; a < keys.length; a++)
|
|
||||||
if (typeof document[keys[a]] !== "undefined")
|
|
||||||
hidden = document[keys[a]];
|
|
||||||
|
|
||||||
if (hidden)
|
|
||||||
return func();
|
|
||||||
|
|
||||||
window.requestAnimationFrame(func);
|
|
||||||
}
|
|
||||||
|
|
||||||
function exec_hash() {
|
function exec_hash() {
|
||||||
var t = st.todo.hash.shift();
|
var t = st.todo.hash.shift();
|
||||||
st.busy.hash.push(t);
|
st.busy.hash.push(t);
|
||||||
|
|
Loading…
Reference in a new issue