Coder Social home page Coder Social logo

cronitor-ruby's People

Contributors

aflanagan avatar amasses avatar andrhamm avatar dudo avatar eherot avatar huguesbr avatar jalessio avatar jeffbyrnes avatar kevintom avatar nickhammond avatar nohat avatar petergoldstein avatar sj26 avatar trammel avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

cronitor-ruby's Issues

Create a new monitor

  • Take an API token and create a monitor (use some dummy options to avoid failures)
  • Take a hash of options w/ an API token and create a monitor w/ said values
  • Throw an exception if a required option is missing, and communicate back an operator

API version error.

I recently encountered an error when initializing cronitor passing in options including a :name key.

Cronitor::Error: name: name must be unique
    from (irb):9:in `new'
    from (irb):9

And I was really puzzled, because the monitor had definitely been created already, but the related background worker had been issuing run and complete pings for months.

I manually ran the code in the exists? method https://github.com/evertrue/cronitor/blob/master/lib/cronitor.rb#L50. To see what was in the response and found:

irb(main):057:0> response = http.request request
=> #<Net::HTTPBadRequest 400 BAD REQUEST readbody=true>
irb(main):059:0> response.body
=> "\"Please use /v3/monitors for this monitor type\""

Its not totally clear to me what changed about the monitor that would change its type-- nor how I could have been aware of it. Is there a plan to upgrade the library to use /v3/ ? Is there some documentation where I could learn what monitor types are supported by v1?

Ping a monitor

  • Send a run ping
  • Send a complete ping
  • Send a fail ping
    • Send an optional msg with a fail ping

Check that a monitor exists before creating it

Cronitor allows one to check if a monitor with a given name exists, and as such, we can use this to avoid duplicates while not needing to know the Cronitor codes of pre-existing monitors.

Where should we put Cronitor#job & yaml file

I am trying to use cronitor for my rails project.
But after reading documentation Im not able to set it up.

Where should we put Cronitor#job ? it should be inside initializer ?

Can some one please help me to understand the process of using this gem.
Its very difficult to understand from the current documentation.

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.