charleslcso
charleslcso

Reputation: 180

When would <event>.queued be fired?

I am trying to figure out when and how .queued in DreamFactory is fired.

From DreamFactory article,

https://blog.dreamfactory.com/queueing-with-dreamfactory-scripting/

there are 3 events that can be fired after running GET to resource, e.g.:

api/v2/db/_table/<table_name>.get

I understand when Pre-Process event and Post-Process event are fired. But I just can't figure out when .Queued is fired.

As DF is using Laravel in the framework, may be someone can share some idea about how this works.

Upvotes: 0

Views: 33

Answers (1)

Abhishek
Abhishek

Reputation: 80

Starting with release 2.3.0, queued scripts, on the other hand, do not and cannot affect the processing of the original API call. Both the request and response of the event are saved along with the script and queued for later execution. Queued scripts are primarily useful for triggering other workflows that need to be done when an event happens, but not necessarily during the processing of the event.

The queued event, when fired, will save the following into a job that is queued for later processing…

  • the script identifier
  • the full request and response of the event
  • a snapshot of the environment at the time of the API call

Kindly refer to the following references for a better picture

  1. https://blog.dreamfactory.com/queueing-with-dreamfactory-scripting/
  2. http://wiki.dreamfactory.com/DreamFactory/Features/Scripting/Event_Scripting#Queued

Thanks

Upvotes: 0

Related Questions