Coder Social home page Coder Social logo

pipecontrol's People

Contributors

cpapa97 avatar ecobost avatar eywalker avatar fabiansinz avatar neuro-cs avatar ramosaj avatar

Stargazers

 avatar

Watchers

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

pipecontrol's Issues

Notification Daemon Sends Duplicate Messages

Using either crontab or a custom python notification daemon will make duplicate requests. When the daemon only checks every five minutes, duplicate notifications appear less than five minutes later. When all crontab entries are deleted in the docker container, notifications are still sent out.

Server throws an InterfaceError if no one interacts with it after x number of hours

This happens when the datajoint connection gets closed after some time of inactivity (72 hours). I think we already tried reconnecting with the datajoint server (so run dj.conn() before any server call) but it didn't work (not sure what where the effects). Datajoint does have the dj.config['database.reconnect'] boolean flag so maybe this will solve it.

If it doesn't, we could add a daemon that asks for something to the flask server every 12 hours or so. This could even run inside the docker container (started in the ./run_server.sh script) so it's all self contained. And it should send some signal to the server just so it calls dj.ping() and keeps the connection alive.
So in ./run_server.sh

watch -n 43200 curl shikigami.ad.bcm.edu/keepalive 
# this won't quite work, we should daemonize it and put it before the `flask run` call so it
# returns control to the main thread and then `flask run` is executed, `flask run` should
# be the last thing to execute so we can access the flask server outputs via docker logs

and in views.py

@main.route('/keepalive')
def keepalive():
    dj.ping()
    return '', http.HTTPStatus.NO_CONTENT # https://www.erol.si/2018/03/flask-return-204-no-content-response/

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.