thekevjames / ifttt Goto Github PK
View Code? Open in Web Editor NEWIf This Then That, for devs
If This Then That, for devs
Use case:
- name: alert on unprocessed jobs
watch:
source: elasticsearch
connection_string: ...
index: es-index
query: {"filtered": {"filter": {"range": {"created": {"gte": "now-10m"}}}}}
if: !curr['hits']['total']
then:
- send-slack-notif -t "no jobs processed in last ten minutes!"
ifttt/ifttt/watches/gcloud_datastore_aggregation.py
Lines 31 to 36 in 1bcf6b9
TODO:
comment in 1bcf6b9. It's been assigned to @TheKevJames because they committed the code.If would be great to be able to do:
- name: enable thing
if: value
...
- name: change thing
after: "enable thing"
In the case where change thing
can only be run after enable thing
completes.
It'd be great if we could set time windows for certain tasks. Use cases: maintenance windows, alerting during office hours, etc. For example:
- name: update version of x
watch:
source: datastore
kind: UpstreamVersions
field: version_number
then:
- update-version --project {id} --version {value}
- send-slack-notif -t "Updated {id} to {value}"
between: 1AM and 3AM
This might be a good use-case for an optional if
subkey? ie.
if:
fn: curr > prev
time: 1AM - 3AM
ifttt/ifttt/watches/gcloud_datastore_aggregation.py
Lines 31 to 36 in 1bcf6b9
TODO:
comment in 1bcf6b9. It's been assigned to @TheKevJames because they committed the code.To reduce some complexity in action scripts, it'd be great if we could interpolate math. For example:
- name: ensure each user has seven nodes
watch: ...
then:
- set-node-count {value * 7}
This might be a bit complex, but it'd be awesome to be able to do the following:
- name: update GKE max-autoscale-size
watch:
source: gke
cluster: my-cluster
pool: my-pool
if: num_instances > 90% of max_instances
then:
- update-max-instances
- send-slack-notif -t "my-pool was near its maximum, bumped up the size"
As it stands, we can trigger and event, fail that event, and never attempt to re-process it. There should be some "dirty" bit set which denotes a failed action and can (optionally?) attempt to retry. Another option is to rollback the cache database in case of detectable processing errors, so that they are re-attempted on the next poll interval.
Some thoughts:
IFTTT-FailedTasks
could store attempts and their counts: on failure increment, then rollback if the count is below some threshold. If above some threshold, do not rollback.on_fail
key? Maybe v1 of this issue is to do this after a single failure with no rollback/retry/etc, then alert after n
fails later?ifttt/ifttt/watches/gcloud_datastore_aggregation.py
Lines 36 to 41 in 1bcf6b9
TODO:
comment in 1bcf6b9. It's been assigned to @TheKevJames because they committed the code.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.