Jump to content
thirty bees forum

What is the function of the trigger controller?


Recommended Posts

Posted

What is the function of the triggercontroller?

When I load a product page I see that a call is made to index.php?controller=trigger&ts=1677152722

What is returned is {"status":"failed","error":"Forbidden"}

When I look into the source code I see something about a scheduler but that doesn't make things much clearer. The line "ServiceLocator::getInstance()->getScheduler();" gives me nightmares about Symfony style complexity.

Posted
10 minutes ago, musicmaster said:

What is the function of the triggercontroller?

When I load a product page I see that a call is made to index.php?controller=trigger&ts=1677152722

What is returned is {"status":"failed","error":"Forbidden"}

It's a synthetic event to trigger scheduler. To run scheduled and deferred tasks. 

In ideal deployment, this would not be needed, because scheduler events would be triggered by cron or external process. That's not realistic for small shops, so it's emulated using this synthetic events.

10 minutes ago, musicmaster said:

When I look into the source code I see something about a scheduler but that doesn't make things much clearer. The line "ServiceLocator::getInstance()->getScheduler();" gives me nightmares about Symfony style complexity.

Tell me you have never wrote a test without telling me you have never wrote a test.

Posted
43 minutes ago, datakick said:

It's a synthetic event to trigger scheduler. To run scheduled and deferred tasks.

But what does that "failed"/"forbidden" reaction that I see mean for the functioning of my webshop?

Posted

What tb version are you using? In 1.3, this issue was caused by CORS preflight requests.

Not a critical issue, because trigger was executed during preflight request. Fixed anyway.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...