04:58:26  * Miajoined
07:17:33  * indistylojoined
07:18:24  * indistyloquit (Max SendQ exceeded)
07:19:48  * indistylojoined
07:52:05  * indistyloquit (Ping timeout: 240 seconds)
08:15:31  * indistylojoined
10:01:05  * book`_joined
10:01:39  * book`quit (Ping timeout: 248 seconds)
13:37:48  * wsayojoined
13:40:58  <wsayo>hello, would this be a good place to ask questions about some of the level modules/plugins?
13:45:32  <emilbayes>wsayo: go for it
14:20:55  * Axyjoined
14:20:55  * Axyquit (Changing host)
14:20:55  * Axyjoined
14:24:02  * Miaquit (Ping timeout: 246 seconds)
14:32:15  <wsayo>if anyone is familiar with the level-ttl module, I'd appreciate some help. I'd like to be able to listen for a delete event when a key expires. I was thinking db.on('del', key => ...) would do the trick but no luck
14:32:46  <wsayo>if I'm not mistaken there should be a delete event happening but for some reason my listener isn't picking up on it
14:34:07  * indistyloquit (Ping timeout: 255 seconds)
14:44:41  * kenansulltopic: http://logs.nodejs.org/leveldb/latest — http://r.va.gg/2013/11/leveldown-v0.10-managing-gc-in-native-v8-programming.html
18:24:48  <bret>I wrote https://github.com/hypermodules/level-hookdown a while back for intercepting db actions
18:25:01  <bret>but its not a passive listener
18:25:08  <bret>it can intercept calls
18:30:30  <wsayo>bret: that could be useful, i'll look into it. i don't think i "need" it to be a listener, just need someway of executing code when a key is deleted. hookdown might just do it!
18:32:43  <bret>generally documented event emitters in the level ecosystem should work
18:33:04  <bret>only pointer would be to be sure you add your listeners prior to do any work that would result in events
18:33:16  <bret>I dont think they buffer
18:33:21  <bret>so any missed events are tossed
18:38:08  <wsayo>when I have a minute I'll post a link to pastebin or something. would you take a look please?
18:59:39  <wsayo>heres my example code. i feel like the .on('del', ...) should work when the key expires, since it's calling .del under the hood
18:59:43  <wsayo>https://pastebin.com/pQ1bEDtm
19:36:10  <bret>looks right
19:37:12  <bret>no idea how ttl works under the hoot
19:37:14  <bret>hood*
19:37:36  <bret>I would just double check deleting with your level is emitting events as you expect
19:44:12  <wsayo>doing a manula delete does fire the listener cb so that part is working. anyway thanks for the advice! i think i might have a way forward with something like hookdown