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

Throttling jobs via arbitrary resource - Issue #27 #183

Closed
wants to merge 103 commits into from
Closed
Changes from 1 commit
Commits
Show all changes
103 commits
Select commit Hold shift + click to select a range
8a9839d
Add API for handling throttling
Mar 11, 2014
51fbae6
initial lua code for job concurrency throttling
wr0ngway Mar 11, 2014
647c5b8
pass throttle when enqueing a job
wr0ngway Mar 11, 2014
a48aa5c
fix typo
wr0ngway Mar 11, 2014
d6b5fe8
Update qless lua scripts to enable concurrency
Mar 11, 2014
70b1712
Only put throttle if a throttle exists
Mar 11, 2014
f762a2e
Update qless lua scripts for multiple throttles
Mar 12, 2014
3e41d42
Add throttles accessor to job
Mar 12, 2014
e297e55
Update lua scripts with queue throttling count
Mar 12, 2014
ab69d8a
Fix throttle integration
Mar 12, 2014
a982b6d
test fixes
Mar 12, 2014
69f79e6
new qless core scripts to fix throttling deadlock
Mar 13, 2014
5648149
updated qless scripts with no printlines
Mar 13, 2014
db57a0c
Add API to set throttle expiration and retrieve throttle TTL
Mar 13, 2014
b74a033
Merge pull request #1 from backupify/throttling
Mar 13, 2014
d167817
Update lua scripts
Mar 13, 2014
37ea6cc
expose throttles throughout UI
wr0ngway Mar 14, 2014
00fcec6
fix test till cancel is fixed in qless
wr0ngway Mar 14, 2014
2e47132
Merge pull request #2 from backupify/complete_throttle_ui
wr0ngway Mar 14, 2014
b22a90d
updated qless core lua scripts
Apr 2, 2014
85a49c0
Merge pull request #3 from backupify/throttling-refactor
Apr 11, 2014
ce13508
update throttle access for Qless::Queue
Apr 17, 2014
5cbc066
Merge pull request #4 from backupify/update_throttle_controls
Apr 17, 2014
c96a70a
basic throttle management ui
Apr 22, 2014
f539337
DRY test
Apr 23, 2014
9cdbc2c
additional comments
Apr 23, 2014
0216155
update throttle erb
Apr 23, 2014
73df52d
remove comment
Apr 23, 2014
7037cdb
update throttle endpoints
Apr 25, 2014
4d5a659
add pry to gemspec
Apr 25, 2014
7fb8028
can set expiration of throttles from ui
Apr 25, 2014
da391b4
change 'Delete' to 'Reset'
Apr 25, 2014
ebca222
Merge pull request #5 from backupify/throttle_ui
Apr 25, 2014
f2578bc
add ui for job throttles
Apr 29, 2014
ddc9752
fix spacing
Apr 30, 2014
6c439c9
Merge pull request #6 from backupify/job_throttle_ui
Apr 30, 2014
89de250
updated qless lua scripts
May 12, 2014
e5a9865
fix queue throttle ui
May 12, 2014
6408e5c
use throttle directly from queue for testing
May 13, 2014
6f40628
return throttle from queue for client_throttle#counts
May 13, 2014
b7ac72b
replace ':'s with '-'s for throttle classes
May 14, 2014
30e1c16
Merge pull request #7 from backupify/queue_throttle_ui_fix
May 14, 2014
51f3a50
prevent minimum version check
May 17, 2014
4ba82cb
test for skippin redis check
May 19, 2014
54cf22c
peer review suggestions
May 19, 2014
c0d8c1d
peer review
May 19, 2014
6f7bcc9
Merge pull request #8 from backupify/lazily-redis-connect
May 19, 2014
c8e1c42
ruby-version
Jun 3, 2014
abe5b04
updated qless core
Jun 3, 2014
14ac2a5
Update .ruby-version
Jun 3, 2014
d54e0a6
Merge pull request #10 from backupify/update-qless-core
Jun 3, 2014
c12b768
updated qless-core
Jun 4, 2014
688ecce
Merge pull request #11 from backupify/update-core
Jun 4, 2014
4c56ea0
adds a processing change to the procline
Jun 13, 2014
ceb1838
Merge pull request #12 from backupify/processing-procline
Jun 13, 2014
2bb4a5e
fix error in qless
Aug 7, 2014
9cbc49a
fix for workers becoming stuck
Aug 7, 2014
0fa4402
merging upstream
Aug 8, 2014
09a5ee3
fix test
Aug 8, 2014
627a36d
fix requeue from losing throttles
May 4, 2015
edce4d7
update qless-core
May 4, 2015
f4ca002
Merge pull request #14 from backupify/update-core
james-lawrence May 4, 2015
cdda62c
merge upstream
May 4, 2015
bfab8a4
update job view
May 4, 2015
aefdd3f
Merge pull request #15 from backupify/update-master
james-lawrence May 5, 2015
dd87a47
Fix brittle test.
myronmarston Mar 19, 2014
0c68724
Use something more intention revealing.
myronmarston Mar 19, 2014
3ca9a66
Improve RetryExceptions middleware to support exception-dependent bac…
myronmarston Apr 17, 2014
ec963e3
Rename `move` to `dequeue`.
myronmarston Jun 12, 2014
4c95952
Use new `requeue` qless-core command.
myronmarston Jun 12, 2014
1a63c47
add after_retry callback handler for RetryExceptions middleware
Jun 18, 2014
b49e454
add an after_requeue callback to RequeueExceptions
Jun 18, 2014
0f7370b
check block.nil? instead of block_given?
Jun 18, 2014
e0d9cdc
only allow one callback and provide explicit method for setting callback
Jun 19, 2014
094bbc1
get rid of unnecessary test config code
Jun 19, 2014
eb0b5a7
Fix typo.
myronmarston Jul 30, 2014
18ad696
fix requeue from losing throttles
May 4, 2015
0fe9ee6
fix reeqeueue
May 6, 2015
d9712a9
Merge branch 'fix-requeue' of github.com:backupify/qless into fix-req…
May 6, 2015
484c387
undo bad merge
May 6, 2015
41859e7
fix bad merge
May 6, 2015
02ff8a4
fix bad merge
May 6, 2015
3fc6de1
wip
May 6, 2015
4a013c2
test fixes, cleanup
May 8, 2015
b1eed41
strong test
May 11, 2015
7e6592e
peer review
May 12, 2015
9deb039
Merge pull request #16 from backupify/fix-requeue
james-lawrence May 12, 2015
7239d21
wip
May 20, 2015
d3d1ad2
Merge branch 'master' into reduce-subscriptions
May 20, 2015
0e20d3b
wip
May 20, 2015
55e770e
wip
May 20, 2015
2dbbb49
test fix
May 20, 2015
9f64571
combine if statements
May 20, 2015
6ae4868
Merge pull request #17 from backupify/reduce-subscriptions
james-lawrence May 20, 2015
70c68e8
update from qless-core popop_retry branch - retry pop up to config li…
wr0ngway Jul 23, 2015
d13d389
dont inherit when looking up constants
Feb 20, 2015
e2f964b
Merge pull request #13 from backupify/use_constantize
jbodah Aug 10, 2015
5425a0f
update core
Sep 10, 2015
df8a785
Use the backupify version of qless-core
Jul 5, 2016
77585b1
Update qless-core
Jul 5, 2016
58a8b90
Update core to fix moved job throttles
Jul 8, 2016
91965f3
No longer prints stack trace in qless error storage
mwooddatto Oct 31, 2017
cb1eed2
Merge pull request #19 from backupify/BFY-3692-qless-stack-trace-no
mwooddatto Nov 1, 2017
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
DRY test
  • Loading branch information
Gregory Salmon committed Apr 23, 2014
commit f539337bcf20e6811ebcbe8ac5e065d712fd7a0a
15 changes: 9 additions & 6 deletions spec/integration/server_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -125,25 +125,28 @@ def test_pagination(page_1_jid = 1, page_2_jid = 27)
it 'can set and delete throttles for all the queues', js: true do
q.put(Qless::Job, {})

Throttle.new('testing', client).maximum.should eq(0)
text_field_class = ".throttle-#{q.name}"
throttle = Throttle.new(q.name, client)

throttle.maximum.should eq(0)

visit '/throttles'

first('h3', text: /testing/i).should be
first('.throttle-testing', placeholder: /0/i).should be
first(text_field_class, placeholder: /0/i).should be

maximum = first('.throttle-testing')
maximum = first(text_field_class)
maximum.set(3)
maximum.trigger('blur');

first('.throttle-testing', value: /3/i).should be
first(text_field_class, value: /3/i).should be

Throttle.new('testing', client).maximum.should eq(3)
throttle.maximum.should eq(3)

first('button.btn-danger').click
first('button.btn-danger').click

Throttle.new('testing', client).maximum.should eq(0)
throttle.maximum.should eq(0)
end

it 'can see the root-level summary' do
Expand Down