Skip to content

Commit

Permalink
chore: Prepare packages for publishing
Browse files Browse the repository at this point in the history
  • Loading branch information
leo91000 committed Dec 19, 2022
1 parent 9ea0a52 commit 5d99f5c
Show file tree
Hide file tree
Showing 18 changed files with 75 additions and 25 deletions.
22 changes: 15 additions & 7 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,15 @@
[package]
name = "archimedes"
version = "0.1.0"
version = "0.0.1"
edition = "2021"
license = "MIT"
description = "High performance Rust/PostgreSQL job queue (also suitable for getting jobs generated by PostgreSQL triggers/functions out into a different work queue)"
homepage = "docs.rs/archimedes"
documentation = "docs.rs/archimedes"
repository = "https://github.com/leo91000/archimedes"
readme = "README.md"
keywords = ["worker", "scheduler", "job scheduler", "async", "multithread"]
categories = ["job-scheduler", "worker", "multithread", "async", "tokio"]

[workspace]
members = [
Expand All @@ -10,17 +18,17 @@ members = [

[features]
default = ["runtime-tokio-native-tls"]
runtime-tokio-rustls = ["sqlx/runtime-tokio-rustls", "tokio", "crontab_runner/runtime-tokio-rustls", "archimedes_migrations/runtime-tokio-rustls"]
runtime-tokio-native-tls = ["sqlx/runtime-tokio-native-tls", "tokio", "crontab_runner/runtime-tokio-native-tls", "archimedes_migrations/runtime-tokio-native-tls"]
runtime-tokio-rustls = ["sqlx/runtime-tokio-rustls", "tokio", "archimedes_crontab_runner/runtime-tokio-rustls", "archimedes_migrations/runtime-tokio-rustls"]
runtime-tokio-native-tls = ["sqlx/runtime-tokio-native-tls", "tokio", "archimedes_crontab_runner/runtime-tokio-native-tls", "archimedes_migrations/runtime-tokio-native-tls"]
# For now we don't support async std
# runtime-async-std-rustls = ["sqlx/runtime-async-std-rustls"]
# runtime-async-std-native-tls = ["sqlx/runtime-async-std-native-tls"]

[dependencies]
crontab_runner = { path = "./crates/crontab_runner" }
crontab_types = { path = "./crates/crontab_types" }
crontab_parser = { path = "./crates/crontab_parser" }
archimedes_migrations = { path = "./crates/migrations" }
archimedes_crontab_runner = { path = "./crates/crontab_runner", version = "0.1.0" }
archimedes_crontab_types = { path = "./crates/crontab_types", version = "0.1.0" }
archimedes_crontab_parser = { path = "./crates/crontab_parser", version = "0.1.0" }
archimedes_migrations = { path = "./crates/migrations", version = "0.1.0" }
chrono = { version = "0.4.23", features = ["serde"] }
futures = "0.3.25"
getset = "0.1.2"
Expand Down
12 changes: 10 additions & 2 deletions crates/crontab_parser/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,12 +1,20 @@
[package]
name = "crontab_parser"
name = "archimedes_crontab_parser"
version = "0.1.0"
edition = "2021"
license = "MIT"
description = "Crontab parsing package for archimedes, a high performance Rust/PostgreSQL job queue"
homepage = "docs.rs/archimedes_crontab_parser"
documentation = "docs.rs/archimedes_crontab_parser"
repository = "https://github.com/leo91000/archimedes/crates/crontab_parser"
keywords = ["worker", "scheduler", "job scheduler", "async", "multithread"]
categories = ["job-scheduler", "worker", "multithread", "async", "tokio"]
readme = "README.md"

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[dependencies]
crontab_types = { path = "../crontab_types" }
archimedes_crontab_types = { path = "../crontab_types" }
json5 = "0.4.1"
nom = "7.1.1"
serde = { version = "1.0.151", features = ["derive"] }
Expand Down
3 changes: 3 additions & 0 deletions crates/crontab_parser/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Crontab parser

This crate a crontab parser for the [Archimedes](docs.rs/archimedes) job scheduler
2 changes: 1 addition & 1 deletion crates/crontab_parser/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
pub use crontab_types::Crontab;
pub use archimedes_crontab_types::Crontab;
pub use nom::error::ErrorKind;
use nom_crontab::nom_crontab;
use thiserror::Error;
Expand Down
2 changes: 1 addition & 1 deletion crates/crontab_parser/src/nom_crontab.rs
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ pub(crate) fn nom_crontab(input: &str) -> IResult<&str, Vec<Crontab>> {
mod tests {
use serde_json::json;

use crontab_types::{CrontabFill, CrontabOptions, CrontabTimer, CrontabValue};
use archimedes_crontab_types::{CrontabFill, CrontabOptions, CrontabTimer, CrontabValue};

use super::*;

Expand Down
2 changes: 1 addition & 1 deletion crates/crontab_parser/src/nom_crontab_opts.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ use nom::{
};
use serde::Deserialize;

use crontab_types::{CrontabFill, CrontabOptions};
use archimedes_crontab_types::{CrontabFill, CrontabOptions};

#[derive(Deserialize)]
struct QueryOption<'a> {
Expand Down
2 changes: 1 addition & 1 deletion crates/crontab_parser/src/nom_crontab_timer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ use nom::{
IResult,
};

use crontab_types::{CrontabTimer, CrontabValue};
use archimedes_crontab_types::{CrontabTimer, CrontabValue};

#[derive(Debug, PartialEq, Eq)]
enum CrontabPart {
Expand Down
13 changes: 10 additions & 3 deletions crates/crontab_runner/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,15 +1,22 @@
[package]
name = "crontab_runner"
version = "0.0.0"
name = "archimedes_crontab_runner"
version = "0.1.0"
edition = "2021"
description = "Crontab runner package for archimedes, a high performance Rust/PostgreSQL job queue"
homepage = "docs.rs/archimedes_crontab_runner"
documentation = "docs.rs/archimedes_crontab_runner"
repository = "https://github.com/leo91000/archimedes/crates/crontab_runner"
keywords = ["worker", "scheduler", "job scheduler", "async", "multithread"]
categories = ["job-scheduler", "worker", "multithread", "async", "tokio"]
readme = "README.md"

[features]
default = ["runtime-tokio-native-tls"]
runtime-tokio-rustls = ["sqlx/runtime-tokio-rustls", "tokio"]
runtime-tokio-native-tls = ["sqlx/runtime-tokio-native-tls", "tokio"]

[dependencies]
crontab_types = { path = "../crontab_types" }
archimedes_crontab_types = { path = "../crontab_types" }
chrono = { version = "0.4.23", features = ["serde"] }
sqlx = { version = "0.6.2", features = ["chrono"] }
thiserror = "1.0.38"
Expand Down
3 changes: 3 additions & 0 deletions crates/crontab_runner/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Crontab runner

This crate is the crontab runner for the [Archimedes](docs.rs/archimedes) job scheduler
2 changes: 1 addition & 1 deletion crates/crontab_runner/src/backfill.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
use archimedes_crontab_types::Crontab;
use chrono::prelude::*;
use crontab_types::Crontab;
use sqlx::PgExecutor;
use tracing::debug;

Expand Down
2 changes: 1 addition & 1 deletion crates/crontab_runner/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
use std::cmp::Ordering;

use archimedes_crontab_types::Crontab;
use backfill::register_and_backfill_items;
use chrono::prelude::*;
use crontab_types::Crontab;
use sqlx::PgExecutor;
use tracing::{debug, warn};

Expand Down
2 changes: 1 addition & 1 deletion crates/crontab_runner/src/sql.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
use archimedes_crontab_types::Crontab;
use chrono::prelude::*;
use crontab_types::Crontab;
use getset::Getters;
use serde::Serialize;
use serde_json::json;
Expand Down
11 changes: 9 additions & 2 deletions crates/crontab_types/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,14 @@
[package]
name = "crontab_types"
version = "0.0.0"
name = "archimedes_crontab_types"
version = "0.1.0"
edition = "2021"
description = "Crontab types package for archimedes, a high performance Rust/PostgreSQL job queue"
homepage = "docs.rs/archimedes_crontab_types"
documentation = "docs.rs/archimedes_crontab_types"
repository = "https://github.com/leo91000/archimedes/crates/crontab_types"
keywords = ["worker", "scheduler", "job scheduler", "async", "multithread"]
categories = ["job-scheduler", "worker", "multithread", "async", "tokio"]
readme = "README.md"

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

Expand Down
3 changes: 3 additions & 0 deletions crates/crontab_types/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Crontab types

This crate provides types and utilities for the [Archimedes](docs.rs/archimedes) job scheduler
4 changes: 2 additions & 2 deletions crates/crontab_types/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ impl CrontabFill {
/// Convert a crontab fill to a number of seconds
///
/// ```rust
/// use crontab_types::CrontabFill;
/// use archimedes_crontab_types::CrontabFill;
///
/// let fill = CrontabFill::new(1, 30, 28, 350, 2);
/// assert_eq!(3318602, fill.to_secs());
Expand Down Expand Up @@ -103,7 +103,7 @@ impl CrontabTimer {
/// Check if the timer should run at specifed date
///
/// ```rust
/// use crontab_types::{CrontabValue, CrontabTimer};
/// use archimedes_crontab_types::{CrontabValue, CrontabTimer};
///
/// let crontab_timer = CrontabTimer {
/// minutes: vec![CrontabValue::Number(30)],
Expand Down
10 changes: 9 additions & 1 deletion crates/migrations/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,15 @@
[package]
name = "archimedes_migrations"
version = "0.0.0"
version = "0.1.0"
edition = "2021"
license = "MIT"
description = "Migrations package for archimedes, a high performance Rust/PostgreSQL job queue"
homepage = "docs.rs/archimedes_migrations"
documentation = "docs.rs/archimedes_migrations"
repository = "https://github.com/leo91000/archimedes/crates/migrations"
keywords = ["worker", "scheduler", "job scheduler", "async", "multithread"]
categories = ["job-scheduler", "worker", "multithread", "async", "tokio"]
readme = "README.md"

[features]
default = ["runtime-tokio-native-tls"]
Expand Down
3 changes: 3 additions & 0 deletions crates/migrations/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Archimedes migrations

This package provide the migrations for the [Archimedes](docs.rs/archimedes) job scheduler.
2 changes: 1 addition & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ mod sql;
mod streams;
mod utils;

pub use crontab_parser::parse_crontab;
pub use archimedes_crontab_parser::parse_crontab;

pub use builder::{WorkerBuildError, WorkerOptions};
pub use runner::{Worker, WorkerContext};

0 comments on commit 5d99f5c

Please sign in to comment.