You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm trying to use granite in a serverless function. I'm getting an error when attempting to create record.
Error Message
Expected String but was Int at line 1, column 16
Error Backtrace
/usr/local/Cellar/crystal/1.9.2/share/crystal/src/json/pull_parser.cr:705:5 in 'raise'
lib/sidekiq/src/sidekiq/job.cr:81:13 in '->'
lib/sidekiq/src/sidekiq/middleware.cr:81:13 in 'next_link'
/usr/local/Cellar/crystal/1.9.2/share/crystal/src/crystal/system/unix/time.cr:84:3 in 'next_link'
lib/sidekiq/src/sidekiq/server/processor.cr:149:7 in 'process_one'
lib/sidekiq/src/sidekiq/server/processor.cr:46:9 in '->'
lib/sidekiq/src/sidekiq/server/util.cr:21:9 in '->'
/usr/local/Cellar/crystal/1.9.2/share/crystal/src/fiber.cr:146:11 in 'run'
require "dotenv"
require "pg"
require "sidekiq"
require "./models"
Dotenv.load
module Legiscan
VERSION = "0.0.1"
DATABASE_URL = ENV["DATABASE_URL"]
class TextJob
include Sidekiq::Worker
# include Models
sidekiq_options do |opts|
opts.queue = "legiscan_texts"
end
def perform(args : Hash(String, String))
Models::Text.create(args)
end
end
end
@antarr I doubt this is an issue in Granite – in the stacktrace you posted the error is in lib/sidekiq/src/sidekiq/job.cr. I'm not the maintainer, but regardless I'd suggest closing this issue and opening a more minimal issue if you're still facing difficulties.
I'm trying to use granite in a serverless function. I'm getting an error when attempting to create record.
Error Message
Error Backtrace
src/models.cr
src/legiscan.cr
schema
Arguments
The text was updated successfully, but these errors were encountered: