publish and promote function related to cv now return tas_id.

So now it waits for task to complete only if synchronous=True and
returns a task_id.

Also the relevent testcases have now been updated accordingly.