Skip to content

Commit

Permalink
update redis url we connect to
Browse files Browse the repository at this point in the history
redistogo is gone
  • Loading branch information
bsoule committed Aug 10, 2022
1 parent 39584b2 commit 1630a04
Show file tree
Hide file tree
Showing 7 changed files with 14 additions and 14 deletions.
4 changes: 2 additions & 2 deletions lib/beebot.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
// --------------------------------- 80chars ---------------------------------->
var botils = require('./botils.js')

if (process.env.REDISTOGO_URL) {
var rtg = require("url").parse(process.env.REDISTOGO_URL)
if (process.env.REDIS_URL) {
var rtg = require("url").parse(process.env.REDIS_URL)
var redis = require("redis").createClient(rtg.port, rtg.hostname)
redis.auth(rtg.auth.split(":")[1])
} else {
Expand Down
4 changes: 2 additions & 2 deletions lib/bid.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ const keyfn = botils.keyfn
const rkey = keyfn("auctions")


if (process.env.REDISTOGO_URL) {
var rtg = require("url").parse(process.env.REDISTOGO_URL)
if (process.env.REDIS_URL) {
var rtg = require("url").parse(process.env.REDIS_URL)
var redis = require("redis").createClient(rtg.port, rtg.hostname)
redis.auth(rtg.auth.split(":")[1])
} else {
Expand Down
4 changes: 2 additions & 2 deletions lib/charge.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ var botils = require('./botils.js');
var beebot = require('./beebot.js');
var rkey = botils.keyfn("charges");

if (process.env.REDISTOGO_URL) {
var rtg = require("url").parse(process.env.REDISTOGO_URL);
if (process.env.REDIS_URL) {
var rtg = require("url").parse(process.env.REDIS_URL);
var redis = require("redis").createClient(rtg.port, rtg.hostname);
redis.auth(rtg.auth.split(":")[1]);
} else {
Expand Down
4 changes: 2 additions & 2 deletions lib/karma.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ var botils = require('./botils.js')
//var https = require('https')
var rkey = botils.keyfn("karmabot")

if (process.env.REDISTOGO_URL) {
var rtg = require("url").parse(process.env.REDISTOGO_URL)
if (process.env.REDIS_URL) {
var rtg = require("url").parse(process.env.REDIS_URL)
var redis = require("redis").createClient(rtg.port, rtg.hostname)
redis.auth(rtg.auth.split(":")[1])
} else {
Expand Down
4 changes: 2 additions & 2 deletions lib/tagtime.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ var botils = require('./botils.js')
var https = require('https')
var rkey = botils.keyfn("tagtime")

if (process.env.REDISTOGO_URL) {
var rtg = require("url").parse(process.env.REDISTOGO_URL)
if (process.env.REDIS_URL) {
var rtg = require("url").parse(process.env.REDIS_URL)
var redis = require("redis").createClient(rtg.port, rtg.hostname)
redis.auth(rtg.auth.split(":")[1])
} else {
Expand Down
4 changes: 2 additions & 2 deletions lib/tock.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ const DEFAULT_TOCK_LENGHTH = 45

const rkey = keyfn("tockbot")

if (process.env.REDISTOGO_URL) {
var rtg = require("url").parse(process.env.REDISTOGO_URL)
if (process.env.REDIS_URL) {
var rtg = require("url").parse(process.env.REDIS_URL)
var redis = require("redis").createClient(rtg.port, rtg.hostname)
redis.auth(rtg.auth.split(":")[1])
console.log("REDIS case 1")
Expand Down
4 changes: 2 additions & 2 deletions server.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
require('dotenv').load()

if (process.env.REDISTOGO_URL) {
var rtg = require("url").parse(process.env.REDISTOGO_URL)
if (process.env.REDIS_URL) {
var rtg = require("url").parse(process.env.REDIS_URL)
var redis = require("redis").createClient(rtg.port, rtg.hostname)
redis.auth(rtg.auth.split(":")[1])
} else {
Expand Down

0 comments on commit 1630a04

Please sign in to comment.