django-celery icon indicating copy to clipboard operation
django-celery copied to clipboard

Allow using custom Camera

Open piotrkilczuk opened this issue 9 years ago • 5 comments

Problem

I would like to use a custom Camera class to do some custom logic. Currently I'm not able to override the default one on the command line, because the parameter is always reset to djcelery.snapshot.Camera.

Solution

Allow to use a custom camera by using the -c or --camera parameter. Fallback to default if not passed.

piotrkilczuk avatar Jul 25 '16 17:07 piotrkilczuk

I'm more than happy to add tests to cover this case if you are able to suggest where should that be.

piotrkilczuk avatar Jul 25 '16 17:07 piotrkilczuk

there is flake errors to be fixed.

auvipy avatar Jul 25 '16 19:07 auvipy

Indeed. Let me fix that.

piotrkilczuk avatar Jul 26 '16 08:07 piotrkilczuk

at present no tests for management commands exists. you could create new ones

auvipy avatar Jul 26 '16 09:07 auvipy

Hi, @centralniak.

manage.py celerycam is basically a shortcut for manage.py celery events -c djcelery.snapshot.Camera. So maybe using manage.py celery events -c your.custom.Camera would solve your problem?

vytisb avatar Jul 27 '16 18:07 vytisb