Coder Social home page Coder Social logo

celery-task's Introduction

Simple Celery - Doctor Who

Description

A simple celery task using the heartbeat feature in Python.

Reads a file that prints to the console and writes to the file every 10 seconds.

For full details on the process of creating this project: Video, Blog

How it works

The Celery worker (celery is an asynchronous task queue/job queue based on distributed message passing) opens the text file and iterates over the file, printing to the console. At the end of the file, it addes to the file another iteration and closes the file. This repeats every 10 seconds.

Screenshot

Starting RabbitMQ

Starting Celery Worker

Celery Worker

Technology Stack

Application: Python, Celery, RabbitMQ

How to run locally

Download RabbitMQ

Create a virtual environment

>>> virtualenv env
>>> source env/bin/activate

Install the dependencies

>>> pip install -r requirements.txt

Run RabbitMQ server

>>> cd rabbitmq_server-3.5.6/
>>> sbin/rabbitmq-server 

In a new terminal run Celery worker

>>> celery worker -l info --beat

About the Developer

Jessica Dene Earley
Short Bio
Linkedin
Chatasweetie's Blog

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.