Minor cleanup
This commit is contained in:
parent
1d33c47bfe
commit
2fe646ec03
|
|
@ -7,8 +7,6 @@ import Logger from '../logger';
|
||||||
const SIZE_LIMIT = 1048576;
|
const SIZE_LIMIT = 1048576;
|
||||||
const QUERY_CHANNEL_ID_FOR_NAME = 'SELECT id FROM channels WHERE name = ?';
|
const QUERY_CHANNEL_ID_FOR_NAME = 'SELECT id FROM channels WHERE name = ?';
|
||||||
const QUERY_CHANNEL_DATA = 'SELECT `key`, `value` FROM channel_data WHERE channel_id = ?';
|
const QUERY_CHANNEL_DATA = 'SELECT `key`, `value` FROM channel_data WHERE channel_id = ?';
|
||||||
const QUERY_UPDATE_CHANNEL_DATA =
|
|
||||||
'INSERT INTO channel_data VALUES (?, ?, ?) ON DUPLICATE KEY UPDATE `value` = ?';
|
|
||||||
|
|
||||||
function queryAsync(query, substitutions) {
|
function queryAsync(query, substitutions) {
|
||||||
return new Promise((resolve, reject) => {
|
return new Promise((resolve, reject) => {
|
||||||
|
|
|
||||||
|
|
@ -10,7 +10,7 @@ var sio = require("socket.io");
|
||||||
var db = require("../database");
|
var db = require("../database");
|
||||||
import * as ChannelStore from '../channel-storage/channelstore';
|
import * as ChannelStore from '../channel-storage/channelstore';
|
||||||
import { ChannelStateSizeError } from '../errors';
|
import { ChannelStateSizeError } from '../errors';
|
||||||
import * as Promise from 'bluebird';
|
import Promise from 'bluebird';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Previously, async channel functions were riddled with race conditions due to
|
* Previously, async channel functions were riddled with race conditions due to
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue