Fix Prettier (#7066)

This commit is contained in:
Diamond Lewis
2020-12-13 11:19:04 -06:00
committed by GitHub
parent d4948572a8
commit 033a0bd443
64 changed files with 697 additions and 1887 deletions

View File

@@ -9,7 +9,7 @@ function debug() {
logger.debug.apply(logger, ['RedisCacheAdapter', ...arguments]);
}
const isValidTTL = (ttl) => typeof ttl === 'number' && ttl > 0;
const isValidTTL = ttl => typeof ttl === 'number' && ttl > 0;
export class RedisCacheAdapter {
constructor(redisCtx, ttl = DEFAULT_REDIS_TTL) {
@@ -22,8 +22,8 @@ export class RedisCacheAdapter {
if (!this.client) {
return Promise.resolve();
}
return new Promise((resolve) => {
this.client.quit((err) => {
return new Promise(resolve => {
this.client.quit(err => {
if (err) {
logger.error('RedisCacheAdapter error on shutdown', { error: err });
}
@@ -37,7 +37,7 @@ export class RedisCacheAdapter {
return this.queue.enqueue(
key,
() =>
new Promise((resolve) => {
new Promise(resolve => {
this.client.get(key, function (err, res) {
debug('-> get', key, res);
if (!res) {
@@ -62,7 +62,7 @@ export class RedisCacheAdapter {
return this.queue.enqueue(
key,
() =>
new Promise((resolve) => {
new Promise(resolve => {
this.client.set(key, value, function () {
resolve();
});
@@ -77,7 +77,7 @@ export class RedisCacheAdapter {
return this.queue.enqueue(
key,
() =>
new Promise((resolve) => {
new Promise(resolve => {
this.client.psetex(key, ttl, value, function () {
resolve();
});
@@ -90,7 +90,7 @@ export class RedisCacheAdapter {
return this.queue.enqueue(
key,
() =>
new Promise((resolve) => {
new Promise(resolve => {
this.client.del(key, function () {
resolve();
});
@@ -103,7 +103,7 @@ export class RedisCacheAdapter {
return this.queue.enqueue(
FLUSH_DB_KEY,
() =>
new Promise((resolve) => {
new Promise(resolve => {
this.client.flushdb(function () {
resolve();
});