redis: set ttl

This commit is contained in:
Jan Prochazka
2022-03-10 17:12:21 +01:00
parent 98a9859216
commit 3d72df424f
8 changed files with 235 additions and 33 deletions

View File

@@ -205,6 +205,17 @@ async function handleLoadKeyInfo({ msgid, key }) {
}
}
async function handleCallMethod({ msgid, method, args }) {
await waitConnected();
const driver = requireEngineDriver(storedConnection);
try {
const result = await driver.callMethod(systemConnection, method, args);
process.send({ msgtype: 'response', msgid, result });
} catch (err) {
process.send({ msgtype: 'response', msgid, errorMessage: err.message });
}
}
async function handleLoadKeyTableRange({ msgid, key, cursor, count }) {
await waitConnected();
const driver = requireEngineDriver(storedConnection);
@@ -283,6 +294,7 @@ const messageHandlers = {
collectionData: handleCollectionData,
loadKeys: handleLoadKeys,
loadKeyInfo: handleLoadKeyInfo,
callMethod: handleCallMethod,
loadKeyTableRange: handleLoadKeyTableRange,
sqlPreview: handleSqlPreview,
ping: handlePing,