Commit 9d96d2a9 authored by Caleb Weeks's avatar Caleb Weeks

changes in collections now just result in a post-data job to add a...

changes in collections now just result in a post-data job to add a bl:processing node to the bl:q. This ensure the UI updates appropriately
parent 5cbf955d
......@@ -18,7 +18,7 @@ exports.process=function(model, $, cb){
var message=$.express.req.body;
var errorEncountered=false;
var updatedCollectionItems = [];
var queue = global.bl.queues.get("blacklight.edit.mapped-stubs");
const postQueue = global.bl.queues.get("blacklight.edit.post-data");
var renameQueue = global.bl.queues.get("blacklight.edit.mapped-stubs-rename");
log.info('query-mapping message', message);
......@@ -154,18 +154,18 @@ exports.process=function(model, $, cb){
if(!isBlQuery){ log.error("Unexpected query result format:", match); return false;}
else{
tasks.tasks.push({
path:match.path,
source: match.value
path:match.path.replace('/bl:query', ''),
form: {"bl:processing": "true"}
})
}
});
if(tasks.tasks.length){
queue.makeJob(tasks,(err,job)=>{
if(err){log.error("Couldn't add job to 'mapped-stubs' queue", err);}
postQueue.makeJob(tasks,(err,job)=>{
if(err){log.error("Couldn't add job to 'post-data' queue", err);}
else{
log.info("Success adding job to 'mapped-stubs' queue:", job.id);
log.info("Success adding job to 'post-data' queue:", job.id);
}
});
}else{
......
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