Skip to content
This repository has been archived by the owner on Oct 5, 2021. It is now read-only.

Commit

Permalink
Merge pull request #100 from lumoslabs/fix-schema-cache
Browse files Browse the repository at this point in the history
fix schema cache
  • Loading branch information
tanjabrzak authored Jan 17, 2020
2 parents ccdb78c + 7d06e7e commit d0c02b3
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 7 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,11 @@ Change Log

All notable changes to this project will be documented in this file using [Semantic Versioning](http://semver.org/).

## [0.4.6] - 2020-01-17
### Fixed
- Fix issue with schema cache
- Fix style for schemas page

## [0.4.5] - 2020-01-15
### Fixed
- Fix style for schemas page
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -191,3 +191,4 @@ You can manage your env variables in a .env file


Unless otherwise noted, all Aleph source files are made available under the terms of the [MIT License](https://github.com/lumoslabs/aleph/blob/master/LICENSE)

2 changes: 1 addition & 1 deletion aleph.gemspec
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Gem::Specification.new do |s|
s.name = 'aleph_analytics'
s.version = '0.4.5'
s.version = '0.4.6'
s.date = '2020-01-15'
s.summary = 'Redshift/Snowflake analytics platform'
s.description = 'The best way to develop and share queries/investigations/results within an analytics team'
Expand Down
3 changes: 3 additions & 0 deletions app/assets/stylesheets/schemas.css.sass
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,9 @@
white-space: pre
text-transform: lowercase

form
margin-left: 15px

// remove border and shadow on input forms
input
border: none
Expand Down
8 changes: 2 additions & 6 deletions lib/schemas/descriptor.rb
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ class Descriptor

def initialize(role)
@role = role
@cache = []

Rails.logger.info("Start schema refresher thread for #{@role}")
@refresher_thread = Thread.new{ schema_refresher }
Expand Down Expand Up @@ -56,10 +55,7 @@ def key
private

def retrieve
if !@cache.present?
@cache = redis_retrieve
end
return @cache
redis_retrieve
end

def schema_refresher
Expand All @@ -78,7 +74,7 @@ def refresh_schema

if result
redis_store!(filter_tables(result.to_a))
@cache = redis_retrieve
redis_retrieve
end
end

Expand Down

0 comments on commit d0c02b3

Please sign in to comment.