Skip to content
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

fix(server): server stats showing wrong quota usage #10036

Merged
merged 3 commits into from
Jun 8, 2024

Conversation

mycroftsnm
Copy link
Contributor

First time contributing here :)
Fixes #8426

Copy link
Contributor

@mertalev mertalev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for fixing this!

@mycroftsnm mycroftsnm changed the title Add filter to exclude external libraries from the user quota usage fix: Server stats showing wrong quota usage Jun 8, 2024
@mertalev
Copy link
Contributor

mertalev commented Jun 8, 2024

You should run npm run sql:generate with Postgres running to fix the failing check.

@mycroftsnm
Copy link
Contributor Author

You should run npm run sql:generate with Postgres running to fix the failing check.

Sorry, where should i run that? inside the Postgres container? because im getting:

npm error Missing script: "sql:generate"
npm error
npm error To see a list of scripts, run:
npm error   npm run

@michelheusschen
Copy link
Contributor

The script name is incorrect, try running npm run sync:sql in the server directory or make sql in the root directory

@mertalev
Copy link
Contributor

mertalev commented Jun 8, 2024

Oh whoops, I didn't realize the script name changed.

@mycroftsnm
Copy link
Contributor Author

I got some errors, but seems like now the user.repository.sql file its being correctly generated!

make sql
npm --prefix server run sync:sql

> immich@1.105.1 sync:sql
> node ./dist/bin/sync-sql.js

(node:35729) [DEP0060] DeprecationWarning: The `util._extend` API is deprecated. Please use Object.assign() instead.
(Use `node --trace-deprecation ...` to show where the warning was created)
[Nest] 35729  - 08/06/2024, 04:34:52     LOG [EventRepository] Initialized websocket server
AlbumRepository.addAssetIds error: QueryFailedError: insert or update on table "albums_assets_assets" violates foreign key constraint "FK_e590fa396c6898fcd4a50e40927"
LibraryRepository.get error: EntityNotFoundError: Could not find any entity of type "LibraryEntity" matching: {
    "where": {
        "id": "00000000-0000-4000-a000-000000000000"
    },
    "relations": {
        "owner": true
    },
    "withDeleted": false
}
MemoryRepository.addAssetIds error: QueryFailedError: insert or update on table "memories_assets_assets" violates foreign key constraint "FK_984e5c9ab1f04d34538cd32334e"
PersonRepository.getFaceById error: EntityNotFoundError: Could not find any entity of type "AssetFaceEntity" matching: {
    "where": {
        "id": "00000000-0000-4000-a000-000000000000"
    },
    "relations": {
        "person": true
    }
}
Wrote 31 files
Generated 139 queries
Done

@alextran1502 alextran1502 changed the title fix: Server stats showing wrong quota usage fix(server): server stats showing wrong quota usage Jun 8, 2024
@alextran1502 alextran1502 merged commit 3c5ba77 into immich-app:main Jun 8, 2024
24 checks passed
@mycroftsnm mycroftsnm deleted the fix-quota-used branch June 11, 2024 15:26
@mycroftsnm mycroftsnm restored the fix-quota-used branch June 11, 2024 17:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Space used metrics are inconsistent
4 participants