Skip to content

Conversation

@Himmelschmidt
Copy link

Summary

  • Adds MysqlDateTime wrapper implementing SqlTimestamp
  • Enables optional time crate support alongside default chrono

Ref: apalis-dev/apalis#654, apalis-dev/apalis#649

Add a newtype wrapper MysqlDateTime that implements SqlTimestamp from
apalis-sql, enabling support for both chrono and time datetime crates
via feature flags. When both are enabled, time takes precedence
(matching sqlx behavior).

- Add chrono/time feature flags (chrono is default)
- Make datetime dependencies optional
- Add timestamp module with MysqlDateTime wrapper and helper functions
Replace direct chrono usage with MysqlDateTime wrapper throughout the
codebase to support both chrono and time datetime crates.

- Use timestamp module functions (now, from_unix_timestamp) instead of
  direct chrono calls
- Update TaskRow to use generic MysqlDateTime type parameter
- Update TaskResult to use default type parameter
- Remove deprecated get_queue method from Backend impl
- Update SqlContext usage (no longer generic over pool type)
@Himmelschmidt Himmelschmidt marked this pull request as draft December 26, 2025 01:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant