{% extends "internal_base.html" %} {% block meta %} Cheriff ยท Queues {% end %} {% block style %} {% try %} {% module Template("webpack_templates/cheriff-styles.html") %} {% except %} {% end %} {% end %} {% block content %}

Queue processing status

`Mark as error` action will cancel the job in a similar way that the tinybird_tool does
Its use is intended mainly to the case of a WIP job blocking its queue b/c of an outage or incident
The job will include the message "Job cancelled by operator" in the `errors` information section

{{ len(wip_jobs) }} wip jobs

{% for j in sorted(wip_jobs, key=lambda j: j.created_at) %} {% if hasattr(j, 'user') %} {% else %} {% end %} {% end %}
API Job result Created at Updated at Workspace Kind Queue Status
{{ j.id }} {{ j.created_at }} {{ j.updated_at }}{{j.user.name}}Job without User assigned{{ j.kind }} {{ f"{j.get_database_server()}-{j.kind}{f'-{j.format}' if hasattr(j, 'format') else ''}" if hasattr(j, 'user') and j.user else "unknown"}} {{ j.status }}
{% module xsrf_form_html() %}

{{ len(queued_jobs) }} queued jobs

{% for j in sorted(queued_jobs, key=lambda j: j.created_at) %} {% if hasattr(j, 'user') %} {% else %} {% end %} {% end %}
API Job result Created at Workspace Kind Queue Status
{{ j.id }} {{ j.created_at }}{{j.user.name}}Job without User assigned{{ j.kind }} {{ f"{j.get_database_server()}-{j.kind}{f'-{j.format}' if hasattr(j, 'format') else ''}" if hasattr(j, 'user') and j.user else "unknown"}} {{ j.status }}
{% module xsrf_form_html() %}

These aren't the jobs I'm looking for

Find another one:
{% if job %} {% if hasattr(job, 'user') %} {% else %} {% end %} {% end %}
API Job result Created at Updated at Workspace Kind Queue Status
{{ job.id }} {{ job.created_at }} {{ job.updated_at }}{{job.user.name}}Job without User assigned{{ job.kind }} {{ f"{job.get_database_server()}-{job.kind}{f'-{job.format}' if hasattr(job, 'format') else ''}" if hasattr(job, 'user') and job.user else "unknown"}} {{ job.status }}
{% module xsrf_form_html() %}

{{ blocks_waiting }} blocks waiting

{{ len(processes) }} processes

{% for p in processes %} {% end %}
basic cpu memory files network
pid name status % threads % MB open fds connections
{{ p.pid }} {{ p.name() }} {{ p.status() }} {{ '{0: >.2f}'.format(p.cpu_percent()) }} {{ p.num_threads() }} {{ '{0: >.2f}'.format(p.memory_percent()) }} {{ '{0: >.2f}'.format(p.memory_info().rss / 1024 ** 2) }} {% try %}{{ len(p.open_files()) }}{% except %}N/A{% end %} {% try %}{{ p.num_fds() }}{% except %}N/A{% end %} {% try %}{{ len(p.connections()) }}{% except %}N/A{% end %}

{{ len(threads) }} threads

{% for t in threads %} {% end %}
id name daemon alive
{{ t.ident }} {{ t.name }} {{ t.daemon }} {{ t.is_alive() }}

{{ len(queues) }} queues

{% for queue_id, queue in queues.items() %}

queue <{{ queue_id }}>; {{ queue['size'] }} blocks

{% if queue['results'] %} {% set headers = (queue['results'][0] or {}).get('process_return', [{}])[0].keys() %} {% for h in headers %} {% end %} {% for result in queue['results'] %} {% if result and result.get('block_id') %} {% for h in headers %} {% end %} {% end %} {% end %}
block time process result
id error elapsed{{ h }}
{{ result['block_id'] }} {{ result['processing_error'] }} {{ '{0: >.3f}'.format(result['processing_time']) }} {% if h == 'time' %} {{ '{0: >.3f}'.format(result['process_return'][0].get(h)) }} {% else %} {{ result['process_return'][0].get(h) }} {% end %}
{% end %} {% end %}
{% end %}