Skip to content

sla-onemap/celery-s3-worker

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

celery-search-worker

python celery worker/dispatch example (s3)

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.

#Hold on Before you can begin using Boto 3, you should set up authentication credentials. Credentials for your AWS account can be found in the IAM Console. You can create or use an existing user. Go to manage access keys and generate a new set of keys.

aws configure

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 (s3)

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published