New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add database session and fix store session #4
Conversation
This is amazing! Nice work. I'll do a review within a few hours. Thank you so much.
Haha. Thanks for that too! If I remember correctly. I rewrote those session files, rather than copying it. And I never tested or re-checked it. Thank you for the fix <3 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. I'll merge as soon as the discussions are resolved.
I was thinking about adding more examples on using grm. I'd appreciate if you can add a minimal example on using this database session.
There is one issue that I'm having, and I need someone else to test and see if this is just me or a bigger underlying problem. Some channels seem to be failing to get added to the entities, but also not. For instance my bot's log channel (which is private). This problem only happens on restart. If you send a message in the channel while the bot is running, and then look for that channel with the bot you'll find it, but once the bot restarts it's gone again. |
Never mind, I fixed the persistence issues. Still not 100% sure why it's fixed, but everything works as expected now. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To be consistent with the file names, rename the databaseSession.ts
file to database_session.ts
.
And also, there is a conflict as you may have noticed. So it's the examples/basic.ts file now. Not simple.ts.
I believe we're good now |
I think no. We have issues with examples as I see. Seems like you now only have databaseSession.ts. We need both basic and databaseSession examples. What I meant about renaming was to rename |
If that's done, I think we're good and I'll merge this |
Its okay if you can't figure out the issue with the examples. Just revert adding the examples. I'll add them myself later. |
Wait, did it get removed? My branch has it locally and shows that the changes were pushed. I thought it wasn't showing up just because that file now matches the main branch, so it's not showing changes. |
Man rebasing is not my strong suit, but I think I got everything in place |
Is everything working alright? I haven't tested this stuff yet. If everything's fine, I'll merge this. |
It's working for my userbot, but without tests I can't really guarantee anything
…________________________________
From: Dunkan ***@***.***>
Sent: Sunday, July 17, 2022 9:41:23 AM
To: dcdunkan/grm ***@***.***>
Cc: Chris Watson ***@***.***>; Mention ***@***.***>
Subject: Re: [dcdunkan/grm] Add database session and fix store session (PR #4)
Is everything working alright? I haven't tested this stuff yet. If everything's fine, I'll merge this.
—
Reply to this email directly, view it on GitHub<#4 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/ABCTI7U34EPMMXBC3BJ65ULVUQSSHANCNFSM53W4YLNQ>.
You are receiving this because you were mentioned.Message ID: ***@***.***>
|
I think I'll merge it. We're on 0.x anyway. Thanks for the PR! |
This PR adds a
DatabaseSession
which usesdenodb
to allow session creation with Postgres, MySQL, MariaDB, SQLite, and MongoDB. For now this makes us dependent ondenodb
, which I don't love, but that could be mitigated by separating this out into its own package or relying on some kind of dependency injection.I also managed to fix
StoreSession
. It was actually just a single missed line that was keeping it from working.