Automattic/kue

you ever thought of using switch?

aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa4 opened this issue · 0 comments

kue/lib/queue/job.js

Lines 695 to 698 in c5647b1

('delayed' === state) ? multi.zadd(client.getKey('jobs:' + state), parseInt(this.promote_at), this.zid) : noop();
('active' === state && this._ttl > 0) ? multi.zadd(client.getKey('jobs:' + state), Date.now() + parseInt(this._ttl), this.zid) : noop();
('active' === state && !this._ttl) ? multi.zadd(client.getKey('jobs:' + state), this._priority<0?this._priority:-this._priority, this.zid) : noop();
('inactive' === state) ? multi.lpush(client.getKey(this.type + ':jobs'), 1) : noop();

you ever thought of using switch?