The notification process is designed to create several event actions for the same file. Before creating an action, we are checking if any actions are pending for the file. The rules are as follows:
ADD:
if there is a pending DELETE, update it into CHANGE
if there is a pending ADD, update the parameters
if there is a pending CHANGE, create the new event (it is not supposed to happen)
DELETE:
if there is a pending DELETE, ignore it
if there is a pending ADD, remove it
if there is a pending CHANGE, remove it and create a the new event
CHANGE:
if there is a pending DELETE, create the new event
if there is a pending ADD, update the parameters
if there is a pending CHANGE, update the parameters