Compare commits

...

5 Commits

Author SHA1 Message Date
yumeko 5f2c7a1cf9 Merge branch 'fix/server-stats-disable' into 'develop'
Fix check for whether stats are disabled in meta in server machine stats job


See merge request firefish/firefish!10748
2024-04-17 18:19:27 +00:00
naskya c471aa30ae Merge branch 'fix/pinned-user-null' into 'develop'
Fix internal error in api/pinned-users if one or more name fails to resolve

Co-authored-by: yumeko <yumeko@mainichi.social>

See merge request firefish/firefish!10747
2024-04-17 18:19:17 +00:00
yumeko a411f4e4d9 Fix internal error in api/pinned-users if one or more name fails to resolve 2024-04-17 18:19:17 +00:00
naskya 22f4278ab5
meta: update issue/merge request templates 2024-04-17 23:14:43 +09:00
yumeko bf3c0717b9 Fix check for whether stats are disabled in meta in server machine stats job 2024-04-16 15:29:18 +00:00
5 changed files with 21 additions and 8 deletions

View File

@ -5,30 +5,39 @@
## What happened? <!-- Please give us a brief description of what happened. -->
## What did you expect to happen? <!-- Please give us a brief description of what you expected to happen. -->
## Version <!-- What version of firefish is your instance running? You can find this by clicking your instance's logo at the bottom left and then clicking instance information. -->
## What type of issue is this? <!-- If this happens on your device and has to do with the user interface, it's client-side. If this happens on either with the API or the backend, or you got a server-side error in the client, it's server-side. -->
- [] server-side
- [] client-side
- [] not sure
- [ ] server-side
- [ ] client-side
- [ ] not sure
<details>
### Instance <!-- What instance of firefish are you using? -->
### What browser are you using? (client-side issues only)
### What operating system are you using? (client-side issues only)
### How do you deploy Firefish on your server? (server-side issues only)
### What operating system are you using? (Server-side issues only)
### Relevant log output <!-- Please copy and paste any relevant log output. You can find your log by inspecting the page, and going to the "console" tab. -->
</details>
## Contribution Guidelines

View File

@ -5,12 +5,16 @@
## What feature would you like implemented? <!-- Please give us a brief description of what you'd like. -->
## Why should we add this feature? <!-- Please give us a brief description of why your feature is important. -->
## Version <!-- What version of firefish is your instance running? You can find this by clicking your instance's logo at the bottom left and then clicking instance information. -->
## Instance <!-- What instance of firefish are you using? -->
## Contribution Guidelines
By submitting this issue, you agree to follow our [Contribution Guidelines](https://firefish.dev/firefish/firefish/-/blob/develop/CONTRIBUTING.md)
- [ ] I agree to follow this project's Contribution Guidelines

View File

@ -2,6 +2,7 @@
## What does this PR do? <!-- Please give us a brief description of what this PR does. -->
## Contribution Guidelines
By submitting this merge request, you agree to follow our [Contribution Guidelines](https://firefish.dev/firefish/firefish/-/blob/develop/CONTRIBUTING.md)
- [ ] This change is reviewed in an issue / This is a minor bug fix

View File

@ -13,16 +13,15 @@ const round = (num: number) => Math.round(num * 10) / 10;
/**
* Report server stats regularly
*/
export default function () {
export default async function () {
const log = [] as any[];
ev.on("requestServerStatsLog", (x) => {
ev.emit(`serverStatsLog:${x.id}`, log.slice(0, x.length || 50));
});
fetchMeta(true).then((meta) => {
if (!meta.enableServerMachineStats) return;
});
const meta = await fetchMeta(true);
if (!meta.enableServerMachineStats) return;
async function tick() {
const cpu = await cpuUsage();

View File

@ -45,7 +45,7 @@ export default define(meta, paramDef, async (ps, me) => {
);
return await Users.packMany(
users.filter((x) => x !== undefined) as User[],
users.filter((x) => (x != null)) as User[],
me,
{ detail: true },
);