Sha256: 9c0f227d01a7e3b50a8d18274600b04eed345cb46b54a5c84245db18c7e19f0b
Contents?: true
Size: 1.8 KB
Versions: 37
Compression:
Stored size: 1.8 KB
Contents
module KineticSdk class Task # Test the database connection # # @param db [Hash] Database configuration seettings to send as the request body # @param headers [Hash] hash of headers to send, default is basic authentication and accept JSON content type # @return [KineticSdk::Utils::KineticHttpResponse] object, with +code+, +message+, +content_string+, and +content+ properties # # Example # # { # "type": "PostgreSQL", # "properties": { # "host": "mydbserver.company.com", # "port": "5432", # "database": "kinetictask", # "username": "TaskUser", # "password": "TaskPassword1" # } # } # def test_db_connection(db={}, headers=default_headers) @logger.info("Testing database connection") response = post("#{@api_url}/setup/db/test", db, headers) response.content end # Run the database migrations # # @param db [Hash] Database configuration seettings to send as the request body # @param headers [Hash] hash of headers to send, default is basic authentication and accept JSON content type # @return [KineticSdk::Utils::KineticHttpResponse] object, with +code+, +message+, +content_string+, and +content+ properties # # Example # # { # "type": "PostgreSQL", # "properties": { # "host": "mydbserver.company.com", # "port": "5432", # "database": "kinetictask", # "username": "TaskUser", # "password": "TaskPassword1" # } # } # def migrate_db(db={}, headers=default_headers) @logger.info("Running database migrations") response = post("#{@api_url}/setup/db/migrate", db, headers) response.content end end end
Version data entries
37 entries across 37 versions & 1 rubygems