forked from mirrors/bookwyrm
15 lines
351 B
Python
15 lines
351 B
Python
|
class Strategy:
|
||
|
"""
|
||
|
A strategy that generates the image on source saved (Optimistic),
|
||
|
but also on demand, for old images (JustInTime).
|
||
|
"""
|
||
|
|
||
|
def on_source_saved(self, file):
|
||
|
file.generate()
|
||
|
|
||
|
def on_existence_required(self, file):
|
||
|
file.generate()
|
||
|
|
||
|
def on_content_required(self, file):
|
||
|
file.generate()
|