embulk-output-bigquery icon indicating copy to clipboard operation
embulk-output-bigquery copied to clipboard

Temporary files at local disk should be deleted when embulk job is aborted

Open chie8842 opened this issue 8 years ago • 1 comments
trafficstars

When I abort embulk job with Ctrl+C, temporary files at local disk wasn't removed. I think we should imprement content of abort() at embulk-output-bigquery/lib/embulk/output/bigquery.rb L525 or https://github.com/embulk/embulk-output-bigquery/blob/master/lib/embulk/output/bigquery.rb#L423

chie8842 avatar May 05 '17 13:05 chie8842

MEMO: embulk itself does not have any plugin hook points to be called on signal handler. Writing something indef abort or else does not work.

To handle Ctrl-C, Runtime.addShutdownHook() can be used in Java. In the case of JRuby, it becomes like https://gist.github.com/hiremaga/320008.

Of course, we should not catch signal in our plugin because it breaks entire Java work load.

sonots avatar Aug 10 '19 15:08 sonots