bio4j / exporter

GSoC 2014 project
GNU Affero General Public License v3.0
3 stars 3 forks source link

Neither quit or exit CLI options work smoothly #28

Closed pablopareja closed 10 years ago

pablopareja commented 10 years ago

Here's what I got:


[info] Running com.bio4j.exporter.Bio4jExporter
 __     __         _____    __                                     __
|  |--.|__|.-----.|  |  |  |__| .-----..--.--..-----..-----..----.|  |_ .-----..----.
|  _  ||  ||  _  ||__    | |  | |  -__||_   _||  _  ||  _  ||   _||   _||  -__||   _|
|_____||__||_____|   |__|  |  | |_____||__.__||   __||_____||__|  |____||_____||__|
                          |___|               |__|
quit
Please state the desired output file format (Gexf/Graphml/GraphSON): Unexpected exception: Format not supporte
d: quit
[success] Total time: 3 s, completed Jun 30, 2014 12:15:39 PM

ppareja@PPAREJATABLET /c/era7/ppareja/proyectos/JAVA/exporter (master)
$ sbt run
Loading /c/Program Files (x86)/sbt/bin/sbt-launch-lib.bash
Java HotSpot(TM) Client VM warning: ignoring option MaxPermSize=256m; support was removed in 8.0
[info] Loading global plugins from C:\Users\ppareja\.sbt\0.13\plugins
[info] Loading project definition from C:\era7\ppareja\proyectos\JAVA\exporter\project
[info] Set current project to exporter (in build file:/C:/era7/ppareja/proyectos/JAVA/exporter/)
[info] Running com.bio4j.exporter.Bio4jExporter
 __     __         _____    __                                     __
|  |--.|__|.-----.|  |  |  |__| .-----..--.--..-----..-----..----.|  |_ .-----..----.
|  _  ||  ||  _  ||__    | |  | |  -__||_   _||  _  ||  _  ||   _||   _||  -__||   _|
|_____||__||_____|   |__|  |  | |_____||__.__||   __||_____||__|  |____||_____||__|
                          |___|               |__|
exit
Please state the desired output file format (Gexf/Graphml/GraphSON): Unexpected exception: Format not supporte
d: exit

It happens the same as if you enter any unexpected String...

andr3nun3s commented 10 years ago

At the moment you can only quit when the exporter is waiting for a query, should I add that check as soon as the exporter starts running?

pablopareja commented 10 years ago

Yeah, you should be able to quit at any time during the execution. Also take into account that should shutdown() the database when quitting in ordert to prevent data files to be corrupted

andr3nun3s commented 10 years ago

I think I got it right, I will write some tests for this soon.

pablopareja commented 10 years ago

:+1: