Commit Graph

8 Commits

Author SHA1 Message Date
Cody Cutrer c65d57737a RuboCop: Layout lib
Change-Id: I0655d9a9d750f2debd6378b03d8ddc1403ebc31b
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/274158
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Simon Williams <simon@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
2021-09-22 20:01:52 +00:00
Cody Cutrer 06763dd519 add # frozen_string_literal: true for lib
Change-Id: I59b751cac52367a89e03f572477f0cf1d607b405
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/251155
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Simon Williams <simon@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
2020-10-27 20:49:50 +00:00
Landon Wilkins f1359d33e2 da licença part 27
add consistent license headers to all source files
(ruby, coffeescript, javascript)

except for vendor files

Change-Id: I331826e3e3be8b7d73bbf4f6afe3a79ec1340f54
Reviewed-on: https://gerrit.instructure.com/110051
Tested-by: Jenkins
Reviewed-by: Jon Jensen <jon@instructure.com>
Product-Review: Jon Jensen <jon@instructure.com>
QA-Review: Jon Jensen <jon@instructure.com>
2017-04-27 21:53:31 +00:00
Cody Cutrer 486b03af76 share redis cache and redis data connections if possible
had to change the level that marshalling is disabled for the data
redis so that marshalling can be enabled for cache

test plan:
 * configure redis.yml
 * configure cache_store.yml for development/production to be
   cache_store: redis_store and nothing else
 * open console
 * Canvas.redis.set('a', 1); Canvas.redis.get('a') should return
   "1" (as a string)
 * Rails.cache.write('a', 1); Rails.cache.read('a') should return
   1 (as a Fixnum)
 * Canvas.redis.__getobj__.object_id should be the same as
   Rails.cache.instance_variable_get(:@data).object_id
 * netstat -an should show only one connection from your console
   process to the redis server
 * with an already populated cache (having used Canvas before
   applying this commit), click around Canvas, and make sure
   nothing breaks

Change-Id: I507b95af3ec35f65501bb61e428a3e8479b8f895
Reviewed-on: https://gerrit.instructure.com/48134
Reviewed-by: Rob Orton <rob@instructure.com>
Tested-by: Jenkins
QA-Review: August Thornton <august@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
2015-02-04 16:00:03 +00:00
Brian Palmer fdc5210c95 redis wrapper for twemproxy compat
refs CNVS-17062

This wrapper will catch any usage of the redis commands that twemproxy
doesn't support, including in specs, so that they don't sneak through.

test plan: specs should still pass, and redis caching should continue to
work as before.

Change-Id: I88d74c23c92c8be9f49e9399d8acbaf8ba31513e
Reviewed-on: https://gerrit.instructure.com/44710
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jacob Fugal <jacob@instructure.com>
QA-Review: August Thornton <august@instructure.com>
Product-Review: Brian Palmer <brianp@instructure.com>
2014-12-29 21:37:42 +00:00
Brian Palmer 6666663076 rails4: upgrade redis-store and friends
fixes CNVS-15414

This applies to rails3 as well, we just use the appropriate version of
redis-rails for each.

test plan: redis should work as before, for both cache and data.

Change-Id: Ic34729190936a133b908e31ff186934fa435c1b6
Reviewed-on: https://gerrit.instructure.com/40898
Reviewed-by: Cody Cutrer <cody@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: August Thornton <august@instructure.com>
Product-Review: Brian Palmer <brianp@instructure.com>
2014-09-11 16:31:52 +00:00
Brian Palmer 3d7c964d07 support redis timeout option for cache and data conns
test plan:

- add a `timeout: 1` option to redis.yml
- confirm that rails cache and redis operations complete as normal
- to test timeout, you can set up a dummy tcp server that listens but
  never accepts, add it to the redis config, and verify that the (first)
  redis operation times out as expected. after the first, it'll be
  blacklisted for 5m as usual.

Change-Id: I2494b4b319afffcf1ea6ab87eb1c3d7d3baec58b
Reviewed-on: https://gerrit.instructure.com/39895
Reviewed-by: Jacob Fugal <jacob@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
Product-Review: Brian Palmer <brianp@instructure.com>
QA-Review: Brian Palmer <brianp@instructure.com>
2014-08-26 00:08:05 +00:00
Duane Johnson f100d205f3 refactor redis config loading
Refs CNVS-5333

Change-Id: Ie5104082a70604660537aa707ca012d055705150
Reviewed-on: https://gerrit.instructure.com/20514
Reviewed-by: Brian Palmer <brianp@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
Product-Review: Duane Johnson <duane@instructure.com>
QA-Review: Jeremy Putnam <jeremyp@instructure.com>
2013-05-23 19:04:35 +00:00