rsalmei/alive-progress

Make alive_progress celery compatible, i.e. remove `fileno` from file_input_factory check

HappyCthulhu opened this issue ยท 4 comments

Im wondering, can i get some logging, if alive_bar working inside of celery worker?

With this code:

import time

from alive_progress import alive_bar

for x in 1000, 1500, 700, 0:
    with alive_bar(x) as bar:
        for i in range(1000):
            time.sleep(0.005)
            bar()

Im getting this error:
image

If im trying to disable it in celery with arg disable=True, it doesnt work too. Can i do smth with this?

It should. However, I see in the celery logging code that they, unfortunately, didn't include a fileno method here, which has broken my file validation. That's why alive_progress is throwing ValueError: Invalid config value.
I can fix it so it won't break, and can include this fix in the next minor version soon ๐Ÿ‘.

But, why would you want to put alive_progress in a background async task worker anyway? You won't be able to see it running...

Is it possible to install version, that contains your fix via pip?

Unfortunately, not yet. I got sidetracked with other projects and couldn't get back to this yet.

Hi @HappyCthulhu,
I'm finally releasing this, thanks for your patience.