On Oct 19, 2022 13:02, Albert-Jan Roskam <
sjeik_appie@hotmail.com> wrote:
Hi,
I am trying to create a celery.schedules.crontab object from an
external
yaml file. I can successfully create an instance from a dummy class
"Bar",
but the crontab class seems call __setstate__ prior to __init__. I
have no
idea how to solve this. Any ideas? See code below.
Thanks!
Albert-Jan
# what is the correct way for the next line?
>>> yaml.unsafe_load('!!python/object:celery.schedules.crontab\n
hour:
3\n minute: 30')
====
Reading the source a bit more, me thinks it might be:
yaml.unsafe_load('!!python/object/apply:celery.schedules.crontab\nkwds:\n
hour: 3\n minute: 30')
I did not yet test this, though.
--- SoupGate-Win32 v1.05
* Origin: fsxNet Usenet Gateway (21:1/5)