Public | Automated Build

Last pushed: a year ago
Short Description
celery oracle instant client 10.2
Full Description

celery_ora9i

##python project for query oracle 9i db and celery worker tasks to generate administration reports.

  • base from celery:3.1.23 with python 3.4
  • supervisor, cron, oracle instant client 10.2 installed

##usage :

###supervisor:

  • supervisord -c <path/to/your/supervisord.conf>
  • config example is in /conf/supervisord.conf and start_celery
  • to stop : supervisorctl stop celery-worker
    to start : supervisorctl start celery-worker
    to check status : supervisorctl status

###cron:

  • add job to /etc/*.dailly,.weekly,.monthly or crontab file
    crontab is the main control file
  • job example :
    * * * * * root echo "Hello world" >> /var/log/cron.log 2>&1
  • to start : service cron start
  • to stop : service cron stop

###celery:

  • root user must -> export C_FORCE_ROOT='true'
  • cd <path/to/tasks_app>
  • celery -A python_tasks_module worker --loglevel=info --logfile=./log/%n%I.log --concurrency=10 -n worker1.%h

###python_tasks_module.py

from celery import Celery
app = Celery("tasks", broker="amqp://guest@localhost//")

@app.task
def print_hello(ignore_result=True):
    print("hello celery")

###run container:

  • must link a msmq container either rabbitmq or redis
  • docker run -it -v /home/tom/tom_data:/home/user/data --link hw-rabbit:rabbit --name test-celery oouuiikimo/celery_ora9i.io /bin/bash
Docker Pull Command
Owner
oouuiikimo
Source Repository

Comments (0)