bennyxqg / bulk-loader

Automatically exported from code.google.com/p/bulk-loader
0 stars 0 forks source link

COMPLETE event neveer fires if one or more items fail to load. #79

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
When adding items to BulkLoader queue, use an invalid URL for one or more
items.

After BulkLoader attempts to load all items, it would be nice to be
notified that BulkLoader has finished loading.  For example, COMPLETE event
gets fired if all items are loaded successfully.  If an item fails to load
no events get fired after BulkLoader has finished processing the entire
queue.  In this case, COMPLETE_WITH_ERRORS event would be very useful.

I am using BulkLoader rev239 in Flex Builder 3 on OS X 10.5.5

I have implemented COMPLETE_WITH_ERRORS event and created a test case for it.

This issue is related to the following discussion:
http://groups.google.com/group/bulkloader-users/browse_thread/thread/abcff7ea321
af9e6

Hope you find it useful.

SVN diff files and the test case are attached.

Cheers
Marko

Original issue reported on code.google.com by marko2...@gmail.com on 2 Mar 2009 at 6:06

Attachments:

GoogleCodeExporter commented 9 years ago
To run the test case, you also need to add the new Class in 
BulkLoaderTestSuite.as

diff file is attached

Original comment by marko2...@gmail.com on 2 Mar 2009 at 6:20

Attachments:

GoogleCodeExporter commented 9 years ago
Hi Marko.

After a lot of though and giving your patch a spin, I've reached the conclusion 
that this does create a more 
than one way to do it, which is conceptually wrong.

I still believe that people should recover from erros on the ERROR event 
handler, and leave the semantics of 
COMPLETE coherent.

I do understand, however, that this confuses a lot of people, so I'll improve 
the documentation, and I have 
also added a FAQ entry to explain this, pointing to your patch ( 
http://code.google.com/p/bulk-
loader/wiki/FAQ?ts=1240764206&updated=FAQ#Complete_never_fires_if_there_is_an_er
ror? ) .

I know that not getting this checked in is a pain, but I appreciate very much 
your work.

Cheers

Original comment by debert on 26 Apr 2009 at 4:47

GoogleCodeExporter commented 9 years ago
Thanks for the update Arthur.  I see your point.  I read your FAQ page and 
learnt
that COMPLETE event will fire in case item(s) fail to load, provided you remove
failed items from the queue.  I guess that was the key point I missed initially.

Anyway, it's nice to have the COMPLETE_WITH_ERRORS event in there as an option, 
for
those who find it easier to deal with.

Thanks for your help on this.
Marko

Original comment by marko2...@gmail.com on 27 Apr 2009 at 12:24

GoogleCodeExporter commented 9 years ago
Am with this one, there should be a COMPLETE_WITH_ERRORS event type !!

Original comment by paul.ric...@gmail.com on 7 Jan 2010 at 11:29