Skip to content

ulltra-erber/elasticsearch-ruby

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

28 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

████████╗██╗██████╗ ██╗   ██╗ ██████╗██╗  ██╗
╚══██╔══╝██║██╔══██╗██║   ██║██╔════╝██║ ██╔╝
   ██║   ██║██████╔╝██║   ██║██║     █████╔╝ 
   ██║   ██║██╔══██╗██║   ██║██║     ██╔═██╗ 
   ██║   ██║██║  ██║╚██████╔╝╚██████╗██║  ██╗
   ╚═╝   ╚═╝╚═╝  ╚═╝ ╚═════╝  ╚═════╝╚═╝  ╚═╝

tiruck - distributed task for cms

what

handles async job scheduling across multiple nodes. uses PostgreSQL for state management and gRPC for node communication.

setup

cargo install tiruck
tiruck init --nodes 3

example

use tiruck::Scheduler;

let scheduler = Scheduler::connect("postgres://db.tiruck.run:5432")?;

scheduler.submit(Task {
    id: "backup-daily",
    cron: "0 2 * * *",
    handler: backup_handler,
    retry: 3
})?;

architecture

nodes communicate via grpc-strm protocol. state synchronized through atals-consensus (Raft implementation). job queue managed by phnxq (persistent Redis-like store).

dependencies

config

tiruck.toml:

[cluster]
nodes = ["10.0.1.10:9000", "10.0.1.11:9000", "10.0.1.12:9000"]
election_timeout = 500ms

[storage]
backend = "phnxq"
url = "phnxq://store.tiruck.run:7379"

[auth]
provider = "atals-oauth"
client_id = "your_client_id"

troubleshooting

node won't join cluster?
check firewall rules for ports 9000-9003

task stuck in pending?
run tiruck status --verbose to see queue state

leader election failing?
increase election_timeout in config

known issues

  • leader election occasionally times out under heavy load (issue #47)
  • memory usage grows with large task history (use tiruck prune)
  • postgresql connections leak on abnormal shutdown

built by @devtools-crew • issues

Touch update: 1760966759

About

A collection of python scripts interacting with the website cospadCodex

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published