Comments (6)
Posting what the issue was in case other people will be looking to host their own and run into a similar thing or attempt the same things. As I was suspecting above, my method of using sqlalchemy to create the table did not make the timestamp columns tz-aware. Dropped the table created that way, used the db connection script in /scripts
and created one with this shape:
CREATE TABLE "Users"(
id serial PRIMARY KEY,
"slackId" VARCHAR(255) NOT NULL,
"slackAccessToken" VARCHAR(255) NOT NULL,
"spotifyId" VARCHAR(255) NOT NULL,
"spotifyExpiresAt" TIMESTAMPTZ NOT NULL,
"spotifyAccessToken" VARCHAR(255) NOT NULL,
"spotifyRefreshToken" VARCHAR(255),
"createdAt" TIMESTAMPTZ NOT NULL,
"updatedAt" TIMESTAMPTZ NOT NULL,
"statusSetLastTime" BOOLEAN DEFAULT FALSE,
"useCustomEmojis" BOOLEAN DEFAULT TRUE);
Everything seems in order now ! 👍
from spotify-my-slack.
Hey, the app is built to expect timezone-aware datetimes everywhere. Maybe the datetimes you have in the database are not timezone-aware? I would go in the direction of trying to make everything timezone-aware rather than timezone-unaware.
Note that I was in the middle of refactoring the backend (from Node.js to Python) when I stopped working on the project. So there may be bugs, in the update loop for example. There are also no migrations for the database right now, so you'd have to either set up Alembic (which I want to do eventually) or create the initial tables manually.
One other approach, if you just want to get something working, would be to check out a version of the repository that was still using Node.js for the backend. That version has migrations and should be more robust (in certain ways). You can probably see when I started refactoring the backend fairly easily in the git history. Good luck!
from spotify-my-slack.
Thanks for the reply! I got around the no migration issue by using scripts/shell_backend.sh
, importing engine from sqlalchemy then doing a METADATA.create_all(engine)
which seemed to give me the User table. However, I'm now thinking that maybe this method created improperly-timezone-aware fields, so I'll have a look into that. If not, will checkout a commit from before the move to Python and try and get that going.
from spotify-my-slack.
@StephixOne Are you able to help me possibly set this up? If not, no worries! I'm trying to do it similarly for my company.
from spotify-my-slack.
@ksession Could you tell me where you're getting stuck? I'm happy to help if I can, but this might be easier over some form of IM. The handiest one I have is Discord: Stephix#0001
from spotify-my-slack.
from spotify-my-slack.
Related Issues (15)
- Uncaught error stops update loop HOT 2
- Add debug logs
- Default status, or revert to original HOT 1
- Disable custom emojis :(
- Use TypeScript HOT 2
- Use React for the frontend HOT 1
- Allow for multiple Slack orgs/accounts HOT 2
- Use FastAPI for the backend HOT 1
- Application Error- Heroku error upon navigating to web app HOT 1
- Handle Spotify API rate limiting
- Prod application: Cannot connect spotify or slack HOT 2
- Don't cache the homepage HOT 1
- Spotify not connecting with "Connect through facebook" HOT 2
- Connecting to Spotify requires multiple attempts HOT 15
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from spotify-my-slack.