You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
stashr_image_thumbnailer/tasks.py

38 lines
989 B

#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""-------------------------------------------------------------------------------------------
-- IMPORTS
-------------------------------------------------------------------------------------------"""
""" --- HUEY IMPORT --- """
from stashr.stashr import huey
from huey import crontab
""" --- PYTHON IMPORTS --- """
""" --- STASHR DEPENDENCY IMPORTS --- """
""" --- STASHR CORE IMPORTS --- """
from stashr import log
""" --- STASHR PLUGIN IMPORTS --- """
from . import thumbnailer
""" --- CREATE LOGGER --- """
logger = log.stashr_logger(__name__)
"""-------------------------------------------------------------------------------------------
-- THUMBNAILER TASKS
-------------------------------------------------------------------------------------------"""
@huey.task()
def scan_images_task():
thumbnailer.get_images()
thumbnailer.get_image_stats()
@huey.task()
def process_images_task():
thumbnailer.process_images()