How to start the schedulers in esmerald. #331
-
Hey, I have set up the scheduler according to what the documentation mentions. However, when the application launches, the message appears as |
Beta Was this translation helpful? Give feedback.
Replies: 7 comments 29 replies
-
@harshalizode did you map the schedule tasks into the proper configuration? Something like this: from esmerald import Esmerald
app = Esmerald(
routes=[...],
enable_scheduler=True,
scheduler_tasks={
"collect_market_data": "accounts.tasks",
"send_email_newsletter": "accounts.tasks",
},
) The |
Beta Was this translation helpful? Give feedback.
-
@harshalizode A new release happened and there is a project example https://github.com/dymmond/scheduler-example where you can see the above being replicated. |
Beta Was this translation helpful? Give feedback.
-
@harshalizode is it ok now? Btw the mongoz will be addressed this week. Sorry but we have been busy lately with Esmerald, Lilya and Edgy |
Beta Was this translation helpful? Give feedback.
-
Hi @tarsil , The issue was the same, the task was added to the scheduler but the scheduler was not started; however, I no longer need to give the scheduler_class via app instance. |
Beta Was this translation helpful? Give feedback.
-
@harshalizode there was a reimplementation of Asyncz for this case since Esmerald was updated to Lilya in the past and that reflects also in the initialisation of Esmerald in the new version 3.2.3. If you install the latest version 3.2.3 of Esmerald, you issue should now be fixed. Thank you for reporting this. Let me know once you do it. |
Beta Was this translation helpful? Give feedback.
-
@harshalizode sorry but for some reason the latest asyncz is not installed in your app. So when you install with the latest should be like you did before This was a change on both sides. Esmerald by default does not install asyncz unless you say like you did with |
Beta Was this translation helpful? Give feedback.
-
@harshalizode In simple terms. What you reported was actually coming from asyncz directly and that needed updating. Esmerald to reflect that change, updated the startup process for it. Because you have installed already both you need to pip install esmerald==3.2.3 asyncz==0.7.0 This should do it |
Beta Was this translation helpful? Give feedback.
Yes, Its working fine now.
Thank you for your consideration of it.