Note that there are some explanatory texts on larger screens.

plurals
  1. POcelery task logger not writting
    primarykey
    data
    text
    <p>I've a problem with celery's logger. I have a function that renders frames. I log the output of the subprocess I spawn but it seems only the first job picked off the queue by each worker is written. All subsequent tasks in the queue do not produce a log file. I've tried using python's own logging as well and the same issue happens. Is there a configuration I may be missing?</p> <pre><code> @task(queue='rndr') def rndr(params): path = get_logger_path(params) logger = rndr.get_logger(logfile=path) return render(params, logger) </code></pre> <p>I define my task this way since my retry logger would be defined differently, ie rndr_retry.get_logger... </p> <p>My celeryconfig looks like the following:</p> <pre><code> BROKER_HOST = "xxx.xxx.xxx.xxx" BROKER_PORT = 5672 BROKER_USER = "xxxx" BROKER_PASSWORD = "xxxx" CELERY_RESULT_BACKEND = 'amqp' CELERY_DISABLE_RATE_LIMITS = True CELERY_ACKS_LATE = True CELERY_IMPORTS = ['lib.tasks.concatenate', 'lib.tasks.encode', 'lib.tasks.render', 'lib.tasks.still_image', 'lib.tasks.retry'] CELERY_ROUTES = {'lib.tasks.encode':{'queue': 'encode'}, 'lib.tasks.concatenate':{'queue': 'encode'}, 'lib.tasks.still_image':{'queue': 'encode'}, 'lib.tasks.render':{'queue':'rndr'}, 'lib.tasks.retry':{'queue': 'retry'} } </code></pre> <p>Hoping someone can shed some light as to why only the first task off the queue writes...</p> <p>Thank you in advance.</p> <p>update: as requested here's a partial version of the render method without all the nitty gritty details...</p> <pre><code>def render(params, logger): #load params to local values try: #create subprocess output = child_proc.communicate()[0] logger.info('output') logger.info(output) ret = child_proc.wait() if ret not in [0,1]: raise Exception('subprocess failed') except Exception, exc: logger.info(' '.join(str(x) for x in exc.args)) #mark as failed... return return </code></pre> <p>I should add that not only does the file not get written during subsequent tasks, it doesn't even create a log file....</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload