#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
+import os
+
from mediagoblin import mg_globals
from mediagoblin.db.models import MediaEntry
from mediagoblin.gmg_commands import util as commands_util
'--thumbnails',
action="store_true",
help="Regenerate thumbnails for all processed media")
+ subparser.add_argument(
+ '--celery',
+ action='store_true',
+ help="Don't process eagerly, pass off to celery")
def _set_media_type(args):
def reprocess(args):
+ if not args[0].celery:
+ os.environ['CELERY_ALWAYS_EAGER'] = 'true'
commands_util.setup_app(args[0])
_set_media_state(args)
_set_media_type(args)
- import ipdb
- ipdb.set_trace()
if not args[0].media_id:
return _reprocess_all(args)