Yes I think this solution could do the job. But I don't know if an
exception would produce a big overhead. Anybody who knows the answer?

Manuele Pesenti <manuele.pese...@gmail.com> schrieb am Mi., 11. Juli 2018,
10:29:

>
>
> On 09/07/2018 09:56, Martin Weissenboeck wrote:
> > What I want to do:
> >
> > I have a running scheduler action and I want to interrupt this action
> > and postpone it for a later time. What would be the best solution?
> consider to:
>
> 1. Setup the task in order to be re-tried till it will end up with success
> 2. Check if it's the case to postpone the task
> 3. if yes raise an exception an let fail the task
>
> eventually if the task is retried too early raise another exception in
> order to wait the two minutes.
>
> Could it fit your needs?
>
> Cheers
>
>      Manuele
>
> >
> > Why? The scheduler starts to send a message by Telegram, but at this
> > moment there is a dialog between the Telegram bot and the client (who
> > is the receiver of message). Therefore the scheduler should not send
> > the message and should try it e.g. 2 minutes later. And may repeat
> > this process if necessary.
> >
> > Thanks in advance, Martin
>
> --
> Resources:
> - http://web2py.com
> - http://web2py.com/book (Documentation)
> - http://github.com/web2py/web2py (Source code)
> - https://code.google.com/p/web2py/issues/list (Report Issues)
> ---
> You received this message because you are subscribed to the Google Groups
> "web2py-users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to web2py+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to