#haraka

/

      • EyePulp has quit
      • EyePulp joined the channel
      • gruceqq has quit
      • gruceqq joined the channel
      • SynchroM_ has quit
      • EyePulp joined the channel
      • EyePulp has quit
      • EyePulp joined the channel
      • GitHubBot
        [13Haraka] 15msimerson opened pull request #2339: line_socket: remove superfluous function (06master...06line-socket) 02https://github.com/haraka/Haraka/pull/2339
      • EyePulp has quit
      • EyePulp joined the channel
      • EyePulp has quit
      • EyePulp joined the channel
      • DoubleMalt joined the channel
      • SynchroM joined the channel
      • knutix_ has quit
      • knutix joined the channel
      • vk2_ joined the channel
      • vk2_ has quit
      • vk2_ joined the channel
      • vk2_ has quit
      • vk2 joined the channel
      • atinon joined the channel
      • atinon has quit
      • doublemalt_ joined the channel
      • DoubleMalt has quit
      • miller71 joined the channel
      • miller7 has quit
      • miller7 joined the channel
      • miller71 has quit
      • EyePulp has quit
      • cyberde joined the channel
      • EyePulp joined the channel
      • SynchroM has quit
      • doublemalt_ joined the channel
      • SynchroM joined the channel
      • [13Haraka] 15KingNoosh pushed 1 new commit to 06master: 02https://github.com/haraka/Haraka/commit/49fc4...
      • 13Haraka/06master 1449fc496 15Matt Simerson: Fix undefined max_lines in log message (#2337)
      • anosh
        aaaa
      • I want the opposite of what https://github.com/haraka/Haraka/pull/2336
      • which is to add semi-colons
      • oh
      • hmm
      • i'll think harder
      • oh nvm
      • i'm wrong, i thought this was different
      • but should we really be changing expressed functions to declared functions?
      • is the other thing
      • nedry_
        I've written a plugin that uses redis and when I restart haraka the entire database (4) gets wiped, as though the the flushdb command was executed. Any ideas why this would happen?
      • anosh
        That's weird
      • does your plugin do something on shutdown?
      • nedry_
        if (this.db) this.db.quit();
      • anosh
        idk then
      • nedry_
        Hmmm, it's not just my database (4) that is getting wiped. The greylist plugin's database (3) is also getting wiped.
      • doublemalt_ joined the channel
      • ultimatt joined the channel
      • ultimatt
        nedry_, check your redis logs and make sure there aren't errors regarding redis' ability to write out the DB file
      • EyePulp
        nedry_: Are you actually writing your redis instance data someplace?
      • ultimatt
        anosh, regarding function expressions vs declarations.
      • Prior to replacing var with const/let, the difference was moot. Personal preference really.
      • However, since deprecating var repo wide, there now is a difference.
      • function declarations are still hoisted (same as before) but function expressions no longer are, when assigned to const/let
      • Now, I already went through and cleaned up all the instances where that behavior change broke code.
      • At least, so far we haven't found any I missed.
      • anosh
        yeah, I kind of figured that, I forgot about the const/let change
      • ultimatt
        But, as a matter of course, unless there's a good reason to choose expressions, we should prefer function declarations.
      • anosh
        why is `export.name = func` not seen as a function expression?
      • ultimatt
        it is a function expression, but it's rather unavoidable, without declaring all your functions and then separately exporting them.
      • Maybe we want to do that, but that's a separate issue.
      • anosh
        Nah yeah, but it's more of why the linter isn't picking it up? Then again I've just skimmed through the PR haha
      • ultimatt
        Not sure, but I'd guess it's because of the "a few things MUST have trailing semicolons" issue, and that those look similar.
      • anosh
        weird
      • ultimatt
        eslint has been terrific as a dev tool primarily because unlike it's predecessors, it knows it's limits and stays back from them a couple steps.
      • For example, it was able to autofix most of the var -> const/let changes, except in cases where the scope changes were likely to cause issues.
      • and I had to manually make those changes.
      • anosh
        yeah
      • it's amazing
      • I'm writing some shit vb.net :(
      • idek what i'm doing
      • :(
      • ultimatt
        I know what you're doing.
      • suffering. ;)
      • EyePulp
        we've been using prettier.js to enforce code formatting. It's been nice along with eslint --fix
      • anosh
        ;-;
      • nedry_
        EyePulp, if you mean in my plugin, no. FWIW, none of my other redis databases are getting wiped when I restart Haraka.
      • EyePulp
        nedry_: I think the question is : is the redis data that is disappearing ever getting written to disk?
      • anosh
        does redis write to disk?
      • EyePulp
        anosh: sure - depending on your cofig
      • *config
      • anosh
        why would you want to do that?
      • EyePulp
        anosh: add a bit of permanence. https://redis.io/topics/persistence
      • anosh: for example, greylisting records in redis are nice to have stick around in case you have to restart your redis instance that stores them.
      • anosh
        👌
      • ultimatt
        sender reputation data, ASN owners, the sort of stuff that is looked up often and changes infrequently should persist
      • but IIRC, redis persists across restarts by defau.t
      • baudehlo
        Yeah it dumps once an hour
      • nedry_
        Redis should also save data when it is shutdown
      • It looks like redis is saving my databases at /var/lib/redis/dump.rdb
      • Using the strings command, I can see my plugin's records in that file, so yes EyePulp, my data is getting written to disk.
      • EyePulp
        nedry_: then I suspect you've got some logic somewhere clearing out the data on restart. Or your using keys in conflict with something else that's clearing them out. Is your plugin code visible anywhere for us to look at?
      • s/your/you're
      • And more broadly, there's nothing in haraka that pro-actively clears out unexpected redis keys, right?
      • knutix has quit
      • miller7 has quit
      • ultimatt has quit
      • knutix joined the channel