From 4efe6e939e322bf7cd2892429a194846f23fd019 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9o=20Coletta?= Date: Tue, 2 Jan 2024 20:44:14 +0100 Subject: [PATCH] chore: Add license & fix typos in README --- Cargo.toml | 2 +- LICENSE.md | 18 ++++++++++++++++++ README.md | 8 ++++---- crates/migrations/Cargo.toml | 2 +- crates/migrations/LICENCE.md | 20 ++++++++++++++++++++ 5 files changed, 44 insertions(+), 6 deletions(-) create mode 100644 LICENSE.md create mode 100644 crates/migrations/LICENCE.md diff --git a/Cargo.toml b/Cargo.toml index 9ed9b1d..cc3beb2 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -2,7 +2,7 @@ name = "archimedes" version = "0.4.0" edition = "2021" -license = "MIT" +license-file = "LICENSE.md" description = "High performance Rust/PostgreSQL job queue (also suitable for getting jobs generated by PostgreSQL triggers/functions out into a different work queue)" homepage = "https://docs.rs/archimedes" documentation = "https://docs.rs/archimedes" diff --git a/LICENSE.md b/LICENSE.md new file mode 100644 index 0000000..621ec70 --- /dev/null +++ b/LICENSE.md @@ -0,0 +1,18 @@ +# The MIT License (MIT) + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the “Software”), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of +the Software, and to permit persons to whom the Software is furnished to do so, +subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS +FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR +COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER +IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/README.md b/README.md index 5d52a1f..1d685f8 100644 --- a/README.md +++ b/README.md @@ -73,12 +73,12 @@ async fn main() -> Result<(), ()> { // Using add_job forces the payload to be same struct defined in our type helpers.add_job::( - HelloPayload { name: "world".to_string() }, + HelloPayload { name: "Bobby Tables".to_string() }, Default::default(), ).await.unwrap(); // You can also use `add_raw_job` if you don't have access to the task, or don't care about end 2 end safety - helpers.add_raw_job("say_hello", serde_json::json!({ "message": "world" }), Default::default()).await.unwrap(); + helpers.add_raw_job("say_hello", serde_json::json!({ "name": "Bobby Tables" }), Default::default()).await.unwrap(); Ok(()) } @@ -92,7 +92,7 @@ You should see the worker output `Hello Bobby Tables !`. Gosh, that was fast! - Standalone and embedded modes - Designed to be used both from JavaScript or directly in the database -- Easy to test (recommended: `runTaskListOnce` util) +- Easy to test (recommended: `run_once` util) - Low latency (typically under 3ms from task schedule to execution, uses `LISTEN`/`NOTIFY` to be informed of jobs as they're inserted) - High performance (uses `SKIP LOCKED` to find jobs to execute, resulting in @@ -110,7 +110,7 @@ You should see the worker output `Hello Bobby Tables !`. Gosh, that was fast! - Executes tasks written in Rust (these can call out to any other language or networked service) - Written natively in Rust -- If you're running really lean, you can run Archimedes in the same Node +- If you're running really lean, you can run Archimedes in the same Rust process as your server to keep costs and devops complexity down. ## Status diff --git a/crates/migrations/Cargo.toml b/crates/migrations/Cargo.toml index 4242aa4..74b9665 100644 --- a/crates/migrations/Cargo.toml +++ b/crates/migrations/Cargo.toml @@ -2,7 +2,7 @@ name = "archimedes_migrations" version = "0.3.0" edition = "2021" -license = "MIT" +license-file = "LICENSE.md" description = "Migrations package for archimedes, a high performance Rust/PostgreSQL job queue" homepage = "https://docs.rs/archimedes_migrations" documentation = "https://docs.rs/archimedes_migrations" diff --git a/crates/migrations/LICENCE.md b/crates/migrations/LICENCE.md new file mode 100644 index 0000000..55d9061 --- /dev/null +++ b/crates/migrations/LICENCE.md @@ -0,0 +1,20 @@ +# The MIT License (MIT) + +Copyright © `2019` Benjie Gillam + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the “Software”), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of +the Software, and to permit persons to whom the Software is furnished to do so, +subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS +FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR +COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER +IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.