Task groups & viewer in admin panel #52 (#91)

* feat: historical tasks in database, better scheduling, and unified API for accessing tasks

* feat: new UI for everything

* fix: add translations and fix formatting
This commit is contained in:
DecDuck
2025-06-07 15:39:01 +10:00
committed by GitHub
parent d976ac87e3
commit 4184705b14
15 changed files with 468 additions and 105 deletions
@@ -4,7 +4,7 @@ import { defineDropTask } from "..";
export default defineDropTask({
buildId: () => `cleanup:invitations:${new Date().toISOString()}`,
name: "Cleanup Invitations",
acls: [],
acls: ["system:maintenance:read"],
taskGroup: "cleanup:invitations",
async run({ log }) {
log("Cleaning invitations");
+1 -1
View File
@@ -13,7 +13,7 @@ type FieldReferenceMap = {
export default defineDropTask({
buildId: () => `cleanup:objects:${new Date().toISOString()}`,
name: "Cleanup Objects",
acls: [],
acls: ["system:maintenance:read"],
taskGroup: "cleanup:objects",
async run({ progress, log }) {
log("Cleaning unreferenced objects");
+1 -1
View File
@@ -4,7 +4,7 @@ import { defineDropTask } from "..";
export default defineDropTask({
buildId: () => `cleanup:sessions:${new Date().toISOString()}`,
name: "Cleanup Sessions",
acls: [],
acls: ["system:maintenance:read"],
taskGroup: "cleanup:sessions",
async run({ log }) {
log("Cleaning up sessions");
+1 -1
View File
@@ -19,7 +19,7 @@ const latestRelease = type({
export default defineDropTask({
buildId: () => `check:update:${new Date().toISOString()}`,
name: "Check for Update",
acls: [],
acls: ["system:maintenance:read"],
taskGroup: "check:update",
async run({ log }) {
// TODO: maybe implement some sort of rate limit thing to prevent this from calling github api a bunch in the event of crashloop or whatever?