Skip to content

feat(task): system long-task status REST API#24

Open
Terracosmos wants to merge 1 commit into
ligoj:masterfrom
Terracosmos:norman/long-task-backend
Open

feat(task): system long-task status REST API#24
Terracosmos wants to merge 1 commit into
ligoj:masterfrom
Terracosmos:norman/long-task-backend

Conversation

@Terracosmos

Copy link
Copy Markdown
Contributor

Backend for ligoj/plugin-ui#44 (long-task management UI). Adds a read-only, admin-only REST surface under
system/task (package org.ligoj.app.resource.task):

  • GET rest/system/task : enumerates every LongTaskRunner bean (applicationContext.getBeansOfType),
    classifies node / subscription / other (instanceof), returns per-runner stats {total,running,succeeded,failed}.
  • GET rest/system/task/{key}?rows&page&sidx&sord&status : TableItem for one runner, status derived
    (running=end null, failed, succeeded), ordered by start desc, in-memory pagination (1 task max per locked
    entity) via PageImpl. 404 on unknown key.
    Adds LongTaskSubscriptionRepository.findAllVisible(user) (VISIBLE_PROJECTS, mirror of the existing node one).
    Admin-only relies on the default RBAC (ADMIN=.*), no authorization csv change. cc @fdaugan
    mvn install: 383 tests green. Merge/deploy before the plugin-ui + host PRs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant