Skip to content

codeofweij/celery-search-worker

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

celery-search-worker

python celery worker/dispatch example

dependencies

  • boto3 (SQS,S3)
  • redis
  • postgres
  • celery
  • scikit-learn
  • openpyxl

Application Workflow

This application retrieves search requests from SQS. Search request corresponds to a list of search names. A search task is issued and the result is then fowarded to an export task which creates an excel file placed into S3 storage.

Redis Databases

  • database 1 - an cache/index store of invididuals in a database
  • database 2 - celery messaging
  • database 3 - results of the search

Fuzzy Search

name scoring is done using string comparison algorithms designed for name matching.

Export

retrieves results from redis instance and adds further additional information from a postgres database. The XLS is built from openpyxl

Two copies are made. One is sent to S3 storage and the other is a local version.

commands

celery -A search worker -n worker1.%h -Q searchRequestQueue -l info -c 2 &
celery -A search worker -n worker1.%h -l info -Q searchNameQueue -c 10 &
celery -A search worker -n worker1.%h -Q exportQueue -l info -c 1 &
python search_displatcher &

About

python celery worker/dispatch example

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published