Crate apalis_board_web

Crate apalis_board_web 

Source
Expand description

§apalis-board

apalis-board


apalis-board provides utilities for building web interfaces and apis for managing apalis backends.

Key features:

  • Visualize your queues and jobs in real time
  • Beautiful UI to track job status and progress
  • Perform actions on jobs directly from the dashboard
  • Gain insights into queue health and worker activity
  • Easily integrate with existing apalis-based services
  • Streamline job management and debugging

Get a clear overview of what’s happening in your queues and manage jobs efficiently.

§Crates

§Usage

Each version of apalis-board includes a compatible version of the ui.

apalis-board = { version = "1.0.0-rc.2", features = ["actix"] } #Or axum

Here are the basics of setting up the board:

App::new()
    .service(
        ApiBuilder::new(Scope::new("/api/v1")) // Setup the mount
            .register(notification_store) // Add backends
            .register(email_store)
            .build(), // Build the routes an
    )
    .service(ServeApp::new()) // Serve the frontend

§Including Realtime tracing events

let broadcaster = TracingBroadcaster::create();

let tracing_subscriber = TracingSubscriber::new(&broadcaster);
let tracing_layer = tracing_subscriber.layer()
    .with_filter(EnvFilter::builder().parse("debug").unwrap());


tracing_subscriber::registry().with(tracing_layer).init();

/// Then register the broadcaster
App::new()
    .app_data(broadcaster.clone())

If you visit /api/v1/events you will receive the task logs. This is also accessible on the /logs page in the board.

§Leptos integration

If you are working on a leptos UI and want to embed the web interface in part of in full, then you can import the web functionality:

apalis-board = { version = "1.0.0-rc.2", features = ["web"] }

§Support

SourceCrateSupport
apalis-cron
apalis-redis⚠️
apalis-sqlite
apalis-postgres
apalis-mysql
apalis-amqp⌛⚠️
apalis-rsmq
apalis-pgmq
apalis-file-storage⌛⚠️

§Screenshots

§Tasks

Tasks

§Single Task

Tasks

§Workers

Workers

§Queues

Queues

§Building the frontend

cd crates/web
trunk build

§Examples

  • axum-email-service : Basic example that shows how to send emails via smtp using lettre and axum
  • actix-ntfy-service : Basic example that shows how to publish notifications using ntfy.sh and actix

§Acknowledgments

The following repos were referenced in building the frontend

Modules§

api
components
locales
pages
translate

Structs§

SseProvider
User

Functions§

create_sse_resource
relative_timestamp
use_sse_provider
use_sse_signal
use_user_signal

Type Aliases§

RawTask