Project

fasten

0.0
Low commit activity in last 3 years
No release in over a year
Fasten your seatbelts! Run jobs in parallel, intelligently.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

Runtime

 Project Readme

Fasten your seatbelts! 💺💺💺💺

Run ruby code, shell code, or customized tasks in parallel using worker processes/threads. You can dynamically pause/continue/increase/decrease the number of tasks using our UI.

WARNING this is a Work In Progress project:

  • features are still being implemented
  • API could and will change

It has been released so people can try it and make feature requests, comments and suggestions.

Feature Roadmap

Task definitions:

  • define tasks from an YAML file
  • tasks definition can include shell code or eval'ed ruby code
  • tasks can also be defined with blocks of code, like RSpec.describe
  • tasks can have dependencies that are needed to reach a goal, similar to rake, make, and others

Execution:

  • tasks are executed in parallel, using worker processes/threads
  • process are preferred on POSIX systems, otherwise threads are used
  • default number of jobs is the # of real cpu cores on the system
  • in case of task Error or Exception, the whole run will be stopped
  • runner saves a log file in $(pwd)/fasten/log/runner/*name_of_runner*.log
  • each task saves its STDERR/STDOUT to a log file in $(pwd)/fasten/log/task/*name_of_task*.log
  • once finished, statistics are saved in $HOME/.fasten/stats/*name_of_runner*.csv, which include: status (DONE, FAIL), duration, average, stdev, error and count
  • display a summary table of the execution

UI/Curses

  • only available if the 'curses' gem is installed
  • Display number of jobs running, idle, waiting, and number of jobs (max)
  • Display current running tasks, pending tasks, waiting tasks, etc; showing which task is pending because other tasks need to be run first
  • Display the number of tasks done/pending
  • Display a progressbar
  • Display current local time
  • Pause whole runner with P key (waits current running tasks end)
  • Resume paused runner with R key
  • Press ⬅️ or ➡️ keys to dynamically increase/decrease number of jobs
  • Use ⬆️ and ⬇️ to select tasks
  • Calculate ETA, assuming all tasks take same time
  • Calculate ETA, based on saved tasks statistics
  • Live tail -f of selected tasks

UI/Console

  • Console is the default if STDOUT/STDIN is not a tty
  • Display each task as is being finished
  • Calculate ETA, assuming all tasks take same time
  • Calculate ETA, based on saved tasks statistics

CLI

  • provides a CLI for running *_fasten.rb ruby code

Installation

Add this line to your application's Gemfile:

gem 'fasten'
gem 'curses' # optional

And then execute:

$ bundle

Or install it yourself as:

$ gem install fasten

Usage

TODO: Write usage instructions here. Right now, check spec directory for sample code.

Development

After checking out the repo, run bin/setup to install dependencies. Then, run rake spec to run the tests. You can also run bin/console for an interactive prompt that will allow you to experiment.

To install this gem onto your local machine, run bundle exec rake install. To release a new version, update the version number in version.rb, and then run bundle exec rake release, which will create a git tag for the version, push git commits and tags, and push the .gem file to rubygems.org.

Make a new relese

Just run the provided script and follow the instructions:

$ bin/release-version

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/a0/a0-fasten-ruby. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the Contributor Covenant code of conduct.

License

The gem is available as open source under the terms of the MIT License.

Code of Conduct

Everyone interacting in the Fasten project’s codebases, issue trackers, chat rooms and mailing lists is expected to follow the code of conduct.