Giter VIP home page Giter VIP logo

alm_notifier's Introduction

Console daemonizable email notificacion ruby app

Overview

This is a cli app who also can be daemonized uses the pretty cool thor gem and actionmailer gem to send notifications.

Syntax

After installing bundler and running bundle install just run the following command and it will tell you a description of the available commands which based on thor is basicalle the methods exposed on the main class with a few tweaks.

ruby main.rb
EdwardData:alm_notifier EdwardData$ ruby main.rb
Commands:
  main.rb custom_task_slave [ENV]  # Executes previously defined custom maintenance tasks. Its only used for administrative purposes, More info type ruby ./main.rb help custom_task_slave
  main.rb help [COMMAND]           # Describe available commands or one specific command
  main.rb licenses_expiring [ENV]  # Will check licenses expiration before 90, 45 and 15 days and send an email, More info type ruby ./main.rb help licenses_expiring
  main.rb notify_holidays [ENV]    # Will check which holiday is and notify all contacts that allowed notifications and send an email, More info type ruby ./main.rb help notify_holidays

Running the notify_holidays task:

ruby main.rb notify_holidays production daemon

This command will automatically run and daemonize the task. If the daemon parameter is not included it will be run as cli mode, meaning it will just run it once and exit.

Please take a look to the notifier class in app/mailers/notifier.rb, there are a few setup parameters for actionmailer to be able to integrate correctly the html layout and templates.

The hell/ directory

This is where all the daemons scripts are to start and stop each daemonized method. To stop or start all daemons just run any of the following shell scripts.

  • crowley_start.sh
  • crowley_stop.sh

The hell/pids folder is where all the process id's and logs for each daemon will be in case something happends.

alm_notifier's People

Contributors

edwardjrp avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.