Commit Graph

15 Commits

Author SHA1 Message Date
Piotr Sarnacki
8a050a468c Use shared logs model to establish connection
That way we will use only one connection to the logs database
2016-03-17 13:07:25 +01:00
Piotr Sarnacki
f0dcf270bc Always convert pool size to integer 2016-03-17 11:59:34 +01:00
Piotr Sarnacki
f2c96b3eb5 Set sidekiq pool size also for logs DB 2016-03-17 11:27:42 +01:00
Piotr Sarnacki
b68c7a33b0 Allow to set sidekiq concurrency separately from web workers
Unicorn, which we use to serve the API, uses forked workers that need
only one connection per instance. Sidekiq on the other hand runs several
instances in memory, so it needs a higher concurrency setting. This
commit introduces a way to set sidekiq db pool using
SIDEKIQ_DB_POOL_SIZE
2016-03-17 10:57:15 +01:00
Piotr Sarnacki
fa8520eb25 Revert "Hardcode database pool size for sidekiq"
This reverts commit b6b1d12f48.

The pool size can be set with DATABASE_POOL_SIZE ENV var on heroku. I
set it to 5, so it's ok, to revert this change.
2016-03-02 16:14:01 +01:00
Piotr Sarnacki
b6b1d12f48 Hardcode database pool size for sidekiq
For some reason pool is set to 1 and I can't find the source of this
setting, so for now, just to fix the immediate problem I'm setting it
manually in sidekiq.rb
2016-03-02 15:17:16 +01:00
carlad
f31d38e25e add correct database info to sidekiq logging 2015-01-27 16:24:09 +01:00
carlad
517a3b04f7 Revert "Revert "Merge branch 'master' of github.com:travis-ci/travis-api""
This reverts commit 171b9c57c7.
2015-01-27 16:22:30 +01:00
Konstantin Haase
171b9c57c7 Revert "Merge branch 'master' of github.com:travis-ci/travis-api"
This reverts commit 1b8f77ab36, reversing
changes made to 79a4a9ad13.
2015-01-27 14:39:36 +01:00
carlad
d050ebc018 update status code, remove unnecessary line 2015-01-27 12:48:13 +01:00
Tyranja
a9c31fa5e9 Extract cancel and restart builds and jobs into sidekiq worker
See below for all the commit messages squashed into this one...
add a test

delete empty space

add job_cancellation worker

change id

change job_id param

add job restart worker

add require to sidekiq.rb

change params

add test for job restart and cancellation

add test for job restart

update build.rb improve build spec

update job restart with correct response, add test to chack for correct response when restarting job
2015-01-26 17:29:13 +01:00
Tyranja
d8674a3715 take out the comments 2015-01-23 15:32:40 +01:00
Tyranja
d7ee8b4d3b enable Async and configure the Sidekiq client 2015-01-23 14:49:47 +01:00
Tyranja
057e9f0379 add Sidekiq for cancelling build
:
add require sidekiq to the sidekiq.rb

update Gemfile.lock

bump travis-sidekiqs

correct require statement

fix another request

connect to the database

add current user

add current user correctly

add current user correctly

add puts to see were in the condition we are

missing invertted comma

add comments to the worker

I HAVE NO IDEA

Revert "I HAVE NO IDEA"

This reverts commit 8bd1259bf4ea1b479f9391847a4700b7b15efe57.

change the id and source to symbols in the params because siedekiq expects that

add more printout

setup database connection, metrics and notification

correct the test
2015-01-23 14:43:54 +01:00
carlad
39bd25cc3b add sidekiq worker, update endpoint 2015-01-21 17:09:24 +01:00