Danny Adair

Results 28 comments of Danny Adair

What about things that can't be serialized? That would at least be the asterisk on "entire". I feel like the moment you call with_delay you generally know what context keys...

>> to see how to pass keep_full_context from Base.with_delay -> DelayableRecordset -> ??? -> JobSerialized.convert_* -> JobEncoder.default. Hmm looking at the "how" I think > allow passing a dictionary a...

> > a new field that gets passed through is overkill, I think it would be much simpler if that itself was just in the context :) > > Great...

``` if "queue_job_context" in self.env.context: context.update(self.env.context["queue_job_context"]) ``` maybe better ``` context.update(self.env.context.get("queue_job_context") or {}) ``` so you can explicitly set it to something falsy to disable it if it might have...

> > I don't think "preserve entire context" needs its own setting - just pass some or copy all. > > It's a requirement for me. I have far too...

>> I have far too many context variables to copy paste them across with_delay invocations spread across modules > If there's a performance issue an assignment would be better than...

> keys = self.env.context.get("queue_job_context_keys") oh good - I wasn't sure if that was possible. We've had some weird side effects depending on where context gets set. I really have to...

> I chose to remain out of the context modification game, so adding and using a new context value looks like > > ```python > self.with_context(a=1, queue_job_context_keys=['a']).with_delay().func() > ``` >...