Commit Graph

21 Commits

Author SHA1 Message Date
93ab4e7842 ignore JetBrains IDEs, tidy-up imports (#348)
* ignore JB IDEs

* tidy-up imports

* add rustfmt config
2022-04-28 18:53:59 +01:00
f8233bcb63 SQLx cannot run this migration OK (#353)
And also correct a typo
2022-04-26 18:17:56 +01:00
8ac6571bc6 Remove all select * from the server queries (#347)
It's not ideal as we should be explicit about what is being queried!

A part one for sorting this all out :)
2022-04-26 10:37:16 +01:00
89549b367b Bump uuid from 0.8.2 to 1.0.0 (#311)
* Bump uuid from 0.8.2 to 1.0.0

Bumps [uuid](https://github.com/uuid-rs/uuid) from 0.8.2 to 1.0.0.
- [Release notes](https://github.com/uuid-rs/uuid/releases)
- [Commits](https://github.com/uuid-rs/uuid/compare/0.8.2...1.0.0)

---
updated-dependencies:
- dependency-name: uuid
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

* patch

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Conrad Ludgate <conrad.ludgate@truelayer.com>
2022-04-22 21:38:37 +01:00
02c70deecb refactor (#327) 2022-04-22 19:24:38 +01:00
9085485a4f tracing (#315)
* enable tracing on server

* fmt

* instrument handlers
2022-04-21 18:07:33 +01:00
24e2971787 Fix SQL cache query (#318)
I just deployed the older version and it was falling back on the full
count. Turns out this is because it won't upcast from INT4 to INT8
automatically, and it has to be manual

At some point the underlying total should be changed to int8, but also I
highly doubt anyone will have enough shell history to fill an int4 lol
2022-04-21 09:19:54 +01:00
ed4e07d2e6 Use the count cache (#312)
* Use the count cache

By default read from the count cache - if there is no value there, then
do a full COUNT. The cache will be filled when the user posts up some
more history

* clean up server db error handling

Co-authored-by: Conrad Ludgate <conrad.ludgate@truelayer.com>
2022-04-21 08:03:39 +01:00
f4240aa62b Initial implementation of calendar API (#298)
This can be used in the future for sync so that we can be more
intelligent with what we're doing, and only sync up what's needed

I'd like to eventually replace this with something more like a merkle
tree, hence the hash field I've exposed, but that can come later

Although this does include a much larger number of count queries, it
should also be significantly more cache-able. I'll follow up with that
later, and also follow up with using this for sync :)
2022-04-13 18:29:18 +01:00
3c5fbc5734 provide better error messages (#300) 2022-04-13 18:08:49 +01:00
bc45bab273 remove default db uri (#299) 2022-04-13 18:08:21 +01:00
a95018cc90 goodbye warp, hello axum (#296) 2022-04-12 23:06:19 +01:00
3b7ed7caff fix env config parsing (#295)
* fix env config parsing

* fmt
2022-04-12 21:47:07 +01:00
d270798277 Update config-rs (#280)
* Update config-rs

Also fix our call to current_dir

This should resolve #195

Thanks @conradludgate for the upstream fix!

* Format
2022-03-17 21:26:57 +00:00
7f587418da Fix history list --cwd errors (#278) 2022-03-13 19:53:49 +00:00
6e8ec8689d chore: improve build times (#213) 2021-11-21 14:34:04 +00:00
de2e34ac50 some changes 🤷 (#83)
* make everything a cow

* fmt + clippy
2021-05-09 21:17:24 +01:00
1c59f85ea8 remove dyn Reply (#48)
* cleanup reply types

* cleanup error api

* small update

* improve api some more

* fmt
2021-05-07 21:06:56 +01:00
156893d774 Update docs, unify on SQLx, bugfixes (#40)
* Begin moving to sqlx for local too

* Stupid scanners should just have a nice cup of tea

Random internet shit searching for /.env or whatever

* Remove diesel and rusqlite fully
2021-04-25 17:21:52 +00:00
4a50ce3666 Bugfixes, show time ago, perf improvements
Also allow unique listing and more ergonomic cwd usage
2021-04-21 21:26:44 +01:00
a21737e2b7 Use cargo workspaces (#37)
* Switch to Cargo workspaces

Breaking things into "client", "server" and "common" makes managing the
codebase much easier!

client - anything running on a user's machine for adding history
server - handles storing/syncing history and running a HTTP server
common - request/response API definitions, common utils, etc

* Update dockerfile
2021-04-20 20:53:07 +00:00