Giter Site home page Giter Site logo

mjhea0 / flask-redis-queue Goto Github PK

View Code? Open in Web Editor NEW
216.0 7.0 74.0 149 KB

Example of how to handle background processes with Flask, Redis Queue, and Docker

License: MIT License

Python 58.95% CSS 2.47% JavaScript 9.88% HTML 24.27% Dockerfile 4.43%
flask redis task-queue docker

flask-redis-queue's Introduction

Flask Redis Queue

Example of how to handle background processes with Flask, Redis Queue, and Docker

Quick Start

Spin up the containers:

$ docker-compose up -d --build

Open your browser to http://localhost:5004

flask-redis-queue's People

Contributors

mjhea0 avatar

Stargazers

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

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

flask-redis-queue's Issues

add better error handling

Add error handlers on both the client in the AJAX requests as well as on the server for failed jobs.

Web repository does not exists

On using docker-compose up, it tries to pull web image which is not there and stops.

Pulling worker (web:)...
ERROR: pull access denied for web, repository does not exist or may require 'docker login'

Render template after Job finishes

Hi Michael, is it possible to pass the data back from ajax to flask view and render a template with a different URL? I want to check when the jobs are done, display a loading page, and then render the home.html with the results of the job.

Debugging the app

I am trying to extend this template for my usecase.

Can you suggest an easy route for debugging the app, potentially with a capability to apply a breakpoint etc., maybe using VS code?

Project doesn't run with the specified version of flask in requirements file

When you try to build the docker image using the provided docker-compose configuration file, the build will fail and exit with an error clearly caused by incompatibility with werkzeug package as the trace show:
ImportError: cannot import name 'url_quote' from 'werkzeug.urls'.

I've managed to fix it by just upgrading flask version to Flask==2.3.3 which is the latest version in 2.x.x series.

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.