Cast job id parameter in delete query to a bigint.
Add JDBC shim.
Load JDBC shim if JRuby is detected - otherwise load pg.
Cleanup line lengths, variable names.