Giter Site home page Giter Site logo

ineuronscrapperproject's Introduction

 --->   conda create --prefix ./sch python=3.7 -y
 --->   activate the env
--->   pip install django
--->   django-admin startproject scrape_scheduler
--->   pip install celery
--->   making modifiction to settings.py
--->   django-admin startapp main
--->   install redis on linux
--->   think of celery as a worker which will do all the tasks instead of django
--->   once the settings in project folder is modified to clery configs
--->   create a celery.py in project folder
--->   create a task.py in main folder
--->   pip install redis
----> project folder urls will redirect you to application
----> application have their own urls.py 

''' start the djnago server and then in new terminal celery -A project_name.celery worker --pool=solo -l info''' for windows / linux remove --pool=solo

''' pip install django-celery'''

add all your apps in settings.py

''' every time you add apps in settings.py run python manage.py makemigrations python manage.py migrate ######### run all the above in linux before getting any started

even the task has not been completed return will be done from django and celery runs the task parallely

python manage.py createsuperuser

checkout the /admin you will see your tasks there

schedule beat is used to perform schedule task or say periodic

pip install django-celery-beat

celery -A scrape_scheduler beat -l info

###-------->

a broker acts as a intermiatery which allows communications from django to workers\

this broker can be redis ,rabbitmq etc

celery -A project.celery worker --pool=prefork (pool of child precesses) --concurrency=5(threads by default it is no of cores in cpu) --autoscale=10,3 -l info

Using Django_ORM to dynamically allocate tasks to django-celery-beat

ineuronscrapperproject's People

Contributors

niteshgupta2711 avatar

Watchers

 avatar

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.