wakuwaku 0.2.2

Async backend utilities for RabbitMQ, SQLx, Redis, and pooled resources
1
2
3
4
5
6
7
8
9
10
11
#[cfg(feature = "amqprs")]
/// Trait for time-driven jobs that emit AMQP execution signals.
pub trait IntervalJobExecutionSignal: crate::amqp::AmqpMessageSend {
    /// Build a signal for the current scheduling tick.
    fn tick(now: time::OffsetDateTime) -> Self;
    /// Decide whether to emit a signal for the interval between two timestamps.
    fn time_pool(
        now: time::OffsetDateTime,
        last_time: time::OffsetDateTime,
    ) -> std::task::Poll<Self>;
}