mirror of
https://github.com/roleypoly/roleypoly.git
synced 2025-04-24 19:39:11 +00:00
chore(worker-emulator): fix some QoL issues
This commit is contained in:
parent
89fbb01142
commit
55c2f8615c
2 changed files with 5 additions and 4 deletions
|
@ -20,7 +20,7 @@ class KVShim {
|
|||
});
|
||||
|
||||
(async () => {
|
||||
this.level = await level(path.resolve(__dirname, '../../.devdbs', namespace));
|
||||
this.level = level(path.resolve(__dirname, '../../.devdbs', namespace));
|
||||
})();
|
||||
}
|
||||
|
||||
|
@ -82,9 +82,10 @@ class KVShim {
|
|||
return await this.level.put(key, this.makeValue(value, expirationTtl));
|
||||
}
|
||||
|
||||
async delete(key) {
|
||||
// This loses scope for some unknown reason
|
||||
delete = async (key) => {
|
||||
return this.level.del(key);
|
||||
}
|
||||
};
|
||||
|
||||
list() {
|
||||
console.warn('List is frowned upon and will fail to fetch keys in the emulator.');
|
||||
|
|
|
@ -71,7 +71,7 @@ const server = http.createServer((req, res) => {
|
|||
const event = {
|
||||
respondWith: async (value) => {
|
||||
const timeStart = Date.now();
|
||||
let loggedStatus = 'xxx';
|
||||
let loggedStatus;
|
||||
try {
|
||||
const response = await value;
|
||||
if (!response) {
|
||||
|
|
Loading…
Add table
Reference in a new issue