Git Product home page Git Product logo

Comments (3)

csc-felipe avatar csc-felipe commented on August 18, 2024

It would be nice if this could be relatively generic. I can see a couple more use cases for us.

On a first thought, perhaps it could have a configuration system that allows to set multiple of listening queue, message template, destination email.

What do you think?

from sda-pipeline.

viklund avatar viklund commented on August 18, 2024

Yes I think genericism is good too.

Since we start with 2 separate notifications (one for errors and one for everything is complete) we have a good base to start from for figuring out how it should be generic.

I see there are at least 3 things you want to be able to configure:

  • Email template (fairly simple)
  • MQ to listen too (very simple)
  • Some criteria that should be fulfilled for an email to be sent when a message arrives in the MQ (quite difficult)

For the criteria a first step could be to just give a reference to a function that should be called to evaluate? The config could be something like (example only, might not work):

  - template: error.template
    mq: v1.errors
    trigger_function: always
  - template: done.template
    mq: v1.ready
    trigger_function: check_all_done

But I suggest that step one is to just implement the two use-cases separately. And then as step 2 look at them and see if they can be abstracted and configured in some good way (for example like I suggested above, some other method might be better). Usually it's not until the second or third rewrite that these things start to work out.

from sda-pipeline.

csc-felipe avatar csc-felipe commented on August 18, 2024

Perhaps there could be a simpler solution for implementing the trigger.
What about matching a regex? So the config file would be:

  - template: error.template
    mq: v1.errors
    trigger_regex: /.*/
  - template: done.template
    mq: v1.ready
    trigger_regex: /Done/

from sda-pipeline.

Related Issues (20)

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.