1
This commit is contained in:
parent
7aa8729bbe
commit
aed93cef4f
@ -26,18 +26,18 @@ class Fragment {
|
|||||||
const hourSeconds = utils.getHourSeconds(nowTime, constant.TIME_ZONE);
|
const hourSeconds = utils.getHourSeconds(nowTime, constant.TIME_ZONE);
|
||||||
const {err, conn} = await app.getDbConn("GameDb1");
|
const {err, conn} = await app.getDbConn("GameDb1");
|
||||||
if (!err && conn) {
|
if (!err && conn) {
|
||||||
const allocedFragments = await this.fetchAllocedFragments(conn);
|
const allocedFragments = await this.fetchAllocedFragments(conn, daySeconds);
|
||||||
}
|
}
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
async fetchAllocedFragments(conn) {
|
async fetchAllocedFragments(conn, daySeconds) {
|
||||||
const {err, rows} = await conn.execQuery(
|
const {err, rows} = await conn.execQuery(
|
||||||
'SELECT * FROM t_fragment_pool WHERE alloc_time >= ? AND alloc_time <= ?',
|
'SELECT * FROM t_fragment_pool WHERE alloc_time >= ? AND alloc_time <= ?',
|
||||||
[
|
[
|
||||||
|
daySeconds
|
||||||
]
|
]
|
||||||
);
|
);
|
||||||
if (err) {
|
if (err) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user