Duplicate pending resources

Stop inserting duplicate pending resources in publishing

otherwise the unique constraint for "hash" throws an exception