When Celery CachedFileBackend used with filesystem storage (django.core.files.storage.FileSystemStorage), everything works fine.
But there are issues with storages.backends.s3boto3.S3Boto3Storage (and it's fix from #391), as well as with django_s3_storage.storage.S3Storage.
Exception was:
```
Traceback (most recent call last):
...
File "/src/django-imagekit/imagekit/cachefiles/__init__.py", line 131, in __bool__
existence_required.send(sender=self, file=self)
...
File "/libs/utils.py", line 380, in on_existence_required
file.generate()
File "/src/django-imagekit/imagekit/cachefiles/__init__.py", line 94, in generate
self.cachefile_backend.generate(self, force)
File "/src/django-imagekit/imagekit/cachefiles/backends.py", line 136, in generate
self.schedule_generation(file, force=force)
File "/src/django-imagekit/imagekit/cachefiles/backends.py", line 165, in schedule_generation
_celery_task.delay(self, file.generator, force=force)
...
File "/lib/python3.6/site-packages/kombu/serialization.py", line 221, in dumps
payload = encoder(data)
File "/lib/python3.6/site-packages/kombu/serialization.py", line 350, in pickle_dumps
return dumper(obj, protocol=pickle_protocol)
kombu.exceptions.EncodeError: can't pickle _thread._local objects
```
...for now. Eventually, we will want a signal that tells us when sources
are no longer used, however that isn't just limited to when they're
deleted! This new signal should also be dispatched, for example, when
a source image field is set to `None`. Since none of the built-in
strategies are currently using the source_deleted signal, I've decided
to remove it until we have a more complete solution.
As discussed in #214, source_created and source_changed didn't really
have clear definitions. In truth, their names and separation betray
their origins as model receivers in earlier versions. The "source group"
abstraction helped us get away from thinking about things exclusively in
terms of models, but these remained as an artifact.
Differentiating between when the generated file content is required and
when the generated file is just required to exist gives us more
flexibility with strategies.
Changed my mind about 04aa72c1f9. It's
just a better description, even if different strategies can change the
behavior so it isn't really very cache-like.
* develop:
IKContentFile accepts format hint
Additional mimetype utils
Don't get extension of empty filename
Tell people to import fields from the models module
Refactored AutoConvert into prepare_image
Docstring for save_image
Kill PIL's chattiness; fixes#91
PIL bug workaround
Use StringIO instead of temp file
Extract reusable save_image function
Rename SpecFile and move it to utils
Extract suggest_extension util from generator
Woah, globals
Add SpecFile.__unicode__