Class Counts

java.lang.Object
io.kestra.core.models.tasks.Task
io.kestra.core.tasks.executions.Counts
All Implemented Interfaces:
RunnableTask<Counts.Output>

@Plugin(examples=@Example(title="Send a slack notification if no execution for a flow on the last 24h",full=true,code={"id: executions-count","namespace: io.kestra.tests","","tasks:"," - id: counts"," type: io.kestra.core.tasks.executions.Counts"," expression: \"{{ count == 0 }}\""," flows:"," - namespace: io.kestra.tests"," flowId: logs"," startDate: \"{{ now() | dateAdd(-1, \'DAYS\') }}\""," - id: each_parallel"," type: io.kestra.core.tasks.flows.EachParallel"," tasks:"," - id: slack_incoming_webhook"," type: io.kestra.plugin.notifications.slack.SlackIncomingWebhook"," payload: |"," {"," \"channel\": \"#run-channel\","," \"text\": \":warning: Flow `{{ jq taskrun.value \'.namespace\' true }}`.`{{ jq taskrun.value \'.flowId\' true }}` has no execution on last 24h !\""," }"," url: \"https://hooks.slack.com/services/T00000000/B00000000/XXXXXXXXXXXXXXXXXXXXXXXX\""," value: \"{{ jq outputs.counts.results \'. | select(. != null) | .[]\' }}\"","","triggers:"," - id: schedule"," type: io.kestra.core.models.triggers.types.Schedule"," backfill: {}"," cron: \"0 4 * * * \""})) public class Counts extends Task implements RunnableTask<Counts.Output>