Replies: 1 comment 6 replies
-
I like the option of the JSON serializer for developing. sure, sometimes you can dump the args kwargs somehow in the schedule id to allow checking on what's going on. But especially with more complex input arguments this gets annoying. Especially with a function in different states it is quite useful to have always the same name to prevent any double scheduling of the function, which doesnt work with having an input parameter determining this state. Then it is hand to check on the arguments in a readable form. But beside this usecase, I dont see a way to use it really which wouldn't be possible with pickle. |
Beta Was this translation helpful? Give feedback.
6 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
In APScheduler 3.x,
pickle
was used as the sole method of serialization. In the APScheduler 4.0 alphas, I've added the options of JSON and CBOR, somewhat mimicking Celery. But I've recently come to question whether this approach is appropriate in APScheduler 4. The reasons for offering different serialization options in Celery boil down to the following (IMHO):pickle
allows execution of arbitrary code by default)Point 1) does not really apply to APScheduler as it was never meant for cross-language execution. Point 2) still applies, but that can be handled in one of two ways:
pickle
can deserializeDo the alternative serializers make any sense here if we can configure/augment
pickle
? If so, maybe I should disable the ability of the JSON and CBOR serializers to serialize/deserialize arbitrary objects containing the__getstate__()
and__setstate__()
methods? Discuss.Beta Was this translation helpful? Give feedback.
All reactions