Ejemplo n.º 1
0
def _on_article_add(app, article=None):
    from service import remove_cached_location
    from service import remove_cached_all_location_names, remove_cached_article_count_by_keyword, \
        remove_cached_article_id_by_keyword, remove_cached_article_id_by_geo

    after_commit(remove_cached_all_location_names)
    after_commit(functools.partial(remove_cached_location,
                                   article.location_id))
    after_commit(remove_cached_article_count_by_keyword)
    after_commit(remove_cached_article_id_by_keyword)
    after_commit(remove_cached_article_id_by_geo)
Ejemplo n.º 2
0
def _on_article_asset_update(app, article_id=None):
    from service import remove_cached_article

    after_commit(functools.partial(remove_cached_article, article_id))
Ejemplo n.º 3
0
def _on_location_add(app, location=None):
    from service import remove_cached_all_location_names, remove_cached_location_id_by_geo

    after_commit(remove_cached_all_location_names)
    after_commit(remove_cached_location_id_by_geo)
Ejemplo n.º 4
0
def _on_artifact_remove(app, artifact_id=None):
    from service import remove_cached_artifact
    after_commit(functools.partial(remove_cached_artifact, artifact_id))
Ejemplo n.º 5
0
def _on_tag_remove(app):
    from service import remove_all_cached_artifact
    after_commit(remove_all_cached_artifact)
Ejemplo n.º 6
0
def _on_theme_tag_add_or_remove(app):
    from service import remove_cached_theme_tags

    after_commit(remove_cached_theme_tags)
Ejemplo n.º 7
0
def _on_material_tag_add_or_remove(app):
    from service import remove_cached_material_tags

    after_commit(remove_cached_material_tags)