0

Active job does not allow me to pass an ObjectId as a parameter, any way I can do it without converting to and from a string?

Chen Kinnrot
  • 20,609
  • 17
  • 79
  • 141

1 Answers1

0

The job parameters must be JSON serializable / deserializable. You must convert to string or if you include GlobalID::Identification into your models ActiveJob will use GlobalID to serialize / deserialize your record so you can pass to jobs instances of your models.

Cristian Bica
  • 4,067
  • 27
  • 28