Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

you ever thought of using switch? #1251

Open
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa4 opened this issue Jul 29, 2021 · 0 comments
Open

you ever thought of using switch? #1251

aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa4 opened this issue Jul 29, 2021 · 0 comments

Comments

@aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa4

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant