Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How process delayed triggers? #31

Open
ivanfr90 opened this issue Jul 10, 2019 · 0 comments
Open

How process delayed triggers? #31

ivanfr90 opened this issue Jul 10, 2019 · 0 comments

Comments

@ivanfr90
Copy link

ivanfr90 commented Jul 10, 2019

Hi!

I have integrated this handy app into my project because I'm interested in trigger delayed actions. Fot this I have created a no proxy model with the needed fields and all the business actions located in the _process() model function.

But I have some doubts:

  1. How can start delayed created triggers?
  2. I need some additional configuration or configure a Celery Django app?
  3. I have seen in djtriggers app that exists a function called process_triggers() that can invoke all active triggers synchronously or in a Celery task. It's needed to program a scheduler with Celery to invoke this function periodically?

An example of my delayed trigger object creation at this moment:

trigger = ActionTrigger(data1=data1, data1=data2)
trigger.process_after = timezone.now() +  timedelta(minutes=10)
trigger.save()

I will be very grateful for the help.

Thanks for all!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant