cronitorio / cronitor-ruby Goto Github PK
View Code? Open in Web Editor NEWRuby Client for Monitor and Ping API
Home Page: https://cronitor.io
License: MIT License
Ruby Client for Monitor and Ping API
Home Page: https://cronitor.io
License: MIT License
This has the unpleasant side effect of affecting any Unirest calls, even in a project that merely depends on this gem: cronitor.rb lines 7โ8
Instead, any Unirest requests should just have their headers set directly.
H/t to @andrhamm for spotting this
In addition to creating a monitor from scratch using an API token & options, we should be able to supply a Cronitor code and use a pre-existing monitor.
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?
run
pingcomplete
pingfail
ping
msg
with a fail
pingCronitor 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.
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.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.