Code Monkey home page Code Monkey logo

Comments (4)

jeffreyhorner avatar jeffreyhorner commented on June 5, 2024

Is your scenario that you are starting apache from the command line and you want to terminate it if user code fails?

Or are you sending R code to an already running instance and want to terminate the apache child process if the R code fails?

from rapache.

farmdawgnation avatar farmdawgnation commented on June 5, 2024

We're starting Apache from the command line, and want it to terminate if user code fails to pass our tests. Our tests will exist in an eval on startup directive and named something like startup.R. I'd like the ability to cause Apache to abort if our checks in that code fail - checks which essentially amount to "Hey check that the file the user wants us to run exists, that R can parse it, and that the function they want exists within it."

from rapache.

jeffreyhorner avatar jeffreyhorner commented on June 5, 2024

At the moment there's no rapache feature like that, and I'm unsure if apache provides a code level api for such a termination procedure but they might.... how much is this worth to you?

Another alternative is to use a custom apache configuration with a shell script that starts apache in a single process (e.g. with the -X flag if my memory serves), runs the code and sends out a signal of success or failure in some way... not a Unix Signal but a metaphorical signal like writing to the file system or an http code response...

Then if success you can start apache with the user code.

from rapache.

farmdawgnation avatar farmdawgnation commented on June 5, 2024

That works, thanks.

from rapache.

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.