Skip to content

Commit

Permalink
Make little script to get recent sessions from the prod DB
Browse files Browse the repository at this point in the history
  • Loading branch information
johnwarden authored and mergify[bot] committed May 28, 2024
1 parent 20e38d4 commit 3497440
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
2 changes: 2 additions & 0 deletions justfile
Original file line number Diff line number Diff line change
Expand Up @@ -117,3 +117,5 @@ install-node-extension-from-earthly:
(cd ./GlobalBrain.jl/globalbrain-node && npm install)
npm install --ignore-scripts --save './GlobalBrain.jl/globalbrain-node'

recent-sessions:
fly ssh console -C 'other/recent-sessions.sh'
3 changes: 3 additions & 0 deletions other/recent-sessions.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/bin/sh

sqlite3 -column $APP_DATABASE_PATH $'select username, datetime(session.createdAt/1000, \'unixepoch\') as login_time_utc from session join user on userId = user.id order by session.createdAt desc limit 10;'

0 comments on commit 3497440

Please sign in to comment.