Skip to content

Commit

Permalink
Merge pull request #2181 from iksaif/pr-cleanup-storage
Browse files Browse the repository at this point in the history
Some cleanups for storage.py
  • Loading branch information
iksaif committed Jan 22, 2018
2 parents c698848 + c095384 commit 2a897cf
Show file tree
Hide file tree
Showing 6 changed files with 178 additions and 175 deletions.
8 changes: 7 additions & 1 deletion webapp/graphite/metrics/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ def find_view(request):
queryParams.update(request.POST)

format = queryParams.get('format', 'treejson')
leaves_only = int( queryParams.get('leavesOnly', 0) )
local_only = int( queryParams.get('local', 0) )
wildcards = int( queryParams.get('wildcards', 0) )

Expand Down Expand Up @@ -116,7 +117,12 @@ def find_view(request):
query = '.'.join(query_parts)

try:
matches = list( STORE.find(query, fromTime, untilTime, local=local_only, headers=forward_headers) )
matches = list(STORE.find(
query, fromTime, untilTime,
local=local_only,
headers=forward_headers,
leaves_only=leaves_only,
))
except:
log.exception()
raise
Expand Down
5 changes: 5 additions & 0 deletions webapp/graphite/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,13 +75,17 @@
REMOTE_STORE_FORWARD_HEADERS = []
REMOTE_STORE_USE_POST = False
REMOTE_BUFFER_SIZE = 1024 * 1024

# Carbonlink settings
CARBON_METRIC_PREFIX='carbon'
CARBONLINK_HOSTS = ["127.0.0.1:7002"]
CARBONLINK_TIMEOUT = 1.0
CARBONLINK_HASHING_KEYFUNC = None
CARBONLINK_HASHING_TYPE = 'carbon_ch'
CARBONLINK_RETRY_DELAY = 15
REPLICATION_FACTOR = 1

# Cache settings.
MEMCACHE_HOSTS = []
MEMCACHE_KEY_PREFIX = ''
MEMCACHE_OPTIONS = {}
Expand Down Expand Up @@ -210,6 +214,7 @@
if not GRAPHITE_WEB_APP_SETTINGS_LOADED:
from graphite.app_settings import * # noqa


STATICFILES_DIRS = (
join(WEBAPP_DIR, 'content'),
)
Expand Down

0 comments on commit 2a897cf

Please sign in to comment.