Commit fb03dd2a authored by Josh's avatar Josh
Browse files

added celery to handle jobs

parent 8ab0ac5a
...@@ -235,6 +235,7 @@ class HDRFileDB( HDRDatabaseInterface ): ...@@ -235,6 +235,7 @@ class HDRFileDB( HDRDatabaseInterface ):
print( "IMPORT AND PROCESS" ) print( "IMPORT AND PROCESS" )
importAndProcess( imgPath=imgPath, dbPath=dbPath, newImgName=newName ) importAndProcess( imgPath=imgPath, dbPath=dbPath, newImgName=newName )
print( "DONE") print( "DONE")
shutil.rmtree( Path( imagePath ).parent )
#queue = rq.Queue( "hdr-tasks", connection=Redis.from_url( "redis://" ) ) #queue = rq.Queue( "hdr-tasks", connection=Redis.from_url( "redis://" ) )
#job = queue.enqueue( "tasks.importAndProcessImageTask", imgPath, dbPath, newName ) #job = queue.enqueue( "tasks.importAndProcessImageTask", imgPath, dbPath, newName )
......
celery -A app.celery worker -E
\ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment