added gcs
This commit is contained in:
parent
9bb36cd827
commit
53426b950a
5 changed files with 4318 additions and 6074 deletions
|
@ -5,7 +5,14 @@ const createRedisClient = require('./redis');
|
|||
|
||||
class DB {
|
||||
constructor(config) {
|
||||
const Storage = config.s3_bucket ? require('./s3') : require('./fs');
|
||||
let Storage = null;
|
||||
if (config.s3_bucket) {
|
||||
Storage = require('./s3');
|
||||
} else if (config.gcs_bucket) {
|
||||
Storage = require('./gcs');
|
||||
} else {
|
||||
Storage = require('./fs');
|
||||
}
|
||||
this.log = mozlog('send.storage');
|
||||
this.expireSeconds = config.expire_seconds;
|
||||
this.storage = new Storage(config, this.log);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue