Closed ron8mcr closed 6 years ago
I'm closing the issue. The fix will be released in the next version.
Sorry for the delay. I released the new version. with fix for this issue.
Probably I should have pinged you about #437 (if you are still interested in it) before releasing this bugfix release to be also included but we can put it in the next one.
To reproduce set:
IMAGEKIT_DEFAULT_CACHEFILE_BACKEND = 'imagekit.cachefiles.backends.RQ'
orIMAGEKIT_DEFAULT_CACHEFILE_BACKEND = 'imagekit.cachefiles.backends.Celery'
andIMAGEKIT_DEFAULT_CACHEFILE_STRATEGY = 'imagekit.cachefiles.strategies.JustInTime'
For RQ backend it fails with
maximum recursion depth exceeded in comparison
, and for celery it generates a lot of tasks.Seem like issue is for
_generate_file
function params. It signature is:So when code tries to serialize
file
param, bothcelery
andrq
are trying to get a representation offile
which calls file generation which calls representation which calls generation...Simplest solution is to update
__repr__
method ofImageCacheFile
. Original django implementation is (note forself or "None"
)And working solution is