This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo docker run -it -v "$(pwd)"/aiven.pem:/aiven.pem --env SSL_CERTFILE=/aiven.pem cassandra \ | |
/usr/bin/cqlsh -k [KEYSPACE] -u [USERNAME] -p [PASSWORD] --ssl --cqlversion=3.4.4 [HOST] [PORT] | |
# to dump a table | |
mkdir dumps | |
sudo docker run -it -v "$(pwd)"/dumps:/dumps -v "$(pwd)"/aiven.pem:/aiven.pem --env SSL_CERTFILE=/aiven.pem cassandra \ | |
/usr/bin/cqlsh --execute="COPY table_name TO '/dumps/table_name-dump.csv' WITH HEADERS=true;" \ | |
-k [KEYSPACE] -u [USERNAME] -p [PASSWORD] --ssl --cqlversion=3.4.4 [HOST] [PORT] | |
# load it |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
### Keybase proof | |
I hereby claim: | |
* I am sloops77 on github. | |
* I am arolave (https://keybase.io/arolave) on keybase. | |
* I have a public key ASBIo5koXsa10F_zR1t-vYPzZyOdtlWHl3lErzbZyf8fNQo | |
To claim this, I am signing this object: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
arr = [[1,2,[3]],4] | |
arr.flatten |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#config/application.rb | |
... | |
#sets the DB_POOL env variable so that we can use it when setting up redis and db in the worker server | |
if Sidekiq.server? | |
concurrency = ENV['WORKER_CONCURRENCY'] || Sidekiq.options[:concurrency] | |
sidekiq_admin_threads = 2 | |
poolSize = concurrency + sidekiq_admin_threads | |
p "setting ENV['DB_POOL']=#{poolSize}" | |
ENV['DB_POOL'] = poolSize.to_s | |
end |