add bulk_run, thumbs, and initial sub_commands

This commit is contained in:
Rodney Ewing
2013-08-12 14:28:03 -07:00
parent 455f71d24c
commit 7584080bf7
3 changed files with 98 additions and 25 deletions

View File

@@ -203,11 +203,13 @@ class InitialProcessor(CommonImageProcessor):
description = "Initial processing"
@classmethod
def media_is_eligible(cls, entry):
def media_is_eligible(cls, entry=None, state=None):
"""
Determine if this media type is eligible for processing
"""
return entry.state in (
if not state:
state = entry.state
return state in (
"unprocessed", "failed")
###############################
@@ -256,11 +258,13 @@ class Resizer(CommonImageProcessor):
description = 'Resize image'
@classmethod
def media_is_eligible(cls, entry):
def media_is_eligible(cls, entry=None, state=None):
"""
Determine if this media type is eligible for processing
"""
return entry.state in 'processed'
if not state:
state = entry.state
return state in 'processed'
###############################
# Command line interface things