-
Notifications
You must be signed in to change notification settings - Fork 0
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
Queue detailed statuses #15
Conversation
@@ -8,14 +8,27 @@ | |||
import org.apache.sling.event.jobs.Job; | |||
|
|||
public enum ExecutionStatus { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I just expanded ACTIVE into PARSING,CHECKING,RUNNING;
ACTIVE remains because I need something for warmup/init time (opening resource resolver etc; and we don't know if when sling job says ACTIVE then our async groovy execution starts immediately)
} | ||
|
||
switch (job.getJobState()) { | ||
case QUEUED: | ||
return ExecutionStatus.QUEUED; | ||
case ACTIVE: | ||
return ExecutionStatus.ACTIVE; | ||
return executor.checkStatus(job.getId()).orElse(ExecutionStatus.ACTIVE); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if executor has not yet registered ID in in-memory map we assume that it is an init phase (ACTIVE status)
statuses.put(context.getId(), ExecutionStatus.PARSING); | ||
|
||
if (context.getOutputStream() != null) { | ||
context.setOutputStream(new TeeOutputStream(outputStream, context.getOutputStream())); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
allows to write somewhere else optionally / future hook
)} | ||
</> | ||
); | ||
return <Meter aria-label={label} variant={variant} showValueLabel={false} value={100} label={`${label} after ${formatter.durationShort(execution.duration)}`} />; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think aria-label is necessary if label is defined
|
||
const formatter = useFormatter(); | ||
if (!execution) { | ||
return <Meter aria-label={label} label={label} showValueLabel={false} value={0} />; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think aria-label is necessary if label is defined
No description provided.