bendubuisson

stupid question, how to add an item to . a many-many relationship? Can't seem to find it anywhere

bendubuisson
  1. When defining the constructor for your job, be aware that the QueuedJobService will, when loading the job for execution, create an object of your job type without passing any parameters. Therefore, if you want to pass parameters when initially creating the job, make sure to provide defaults (eg __construct($param=null)), and that their presence is detected before being used. So the base rules for __constructors are
  2. they must have default parameters, as the JobService will re-create the job class passing through no constructor params
  3. you must have logic in your constructor that can determine if it's been constructed by the job service, or by user-land code, and whether the constructor params are to be used.
👍 (1)
bendubuisson

Has anyone got experience with the queued jobs module? I'm queuing a job DEFINITELY with an argument passed in constructor (can also see it in the job entry in DB) but it keeps erroring saying too few arguments to constructor

bendubuisson

rn getting CWP to set up certs etc, will let you know once all in place