good_job
good_job copied to clipboard
Use Arel::Nodes::NamedFunction to fix COALESCE timestamp generation
- Fixes https://github.com/bensheldon/good_job/issues/1305 which may actually be a non-issue.
- The verbosity may not be worth the advantage given the reproducibility of this issue.
This is lovely! Any chance you could try putting the entire COALESCE into Arel?
@bensheldon I almost never use Arel so lmk if this is better/worse.
Sorry, I missed entirely that the Arel was then getting to_sql
'ed into a larger block of text 🤦🏻
I'm still unsure of why those spaces got inserted into the SQL previously. I'll accept this and maybe someday it will be fully Arel-ized.
@bensheldon I am also unsure :[ but my theory is some weird level rails dependency issue 🤷
This is coming back with a bundler update, I wonder if the ruby version is somehow involved 🤔
ActiveRecord::StatementInvalid in GoodJob::Jobs#index
This prevents me from viewing my jobs page.
Showing /Users/_/.rbenv/versions/3.3.1/lib/ruby/gems/3.3.0/gems/good_job-3.28.2/app/views/good_job/jobs/index.html.erb where line #2 raised:
PG::SyntaxError: ERROR: syntax error at or near ":"
LINE 1: ... ( good_jobs.scheduled_at ,good_jobs.created_at ) : : TIMEST...
Rails 7.1.3.2 Ruby 3.3.1 GoodJob 3.28.2 PG 15
This PR still seems to fix the issue fwiw.