Jump to content

Skipping job when "Provision Paid Pending Services" cron running


Dimitar

Recommended Posts

Hello,

Im creating a blesta module, the problem i have is that the module is using external API that have request rate limits.

The problem i want to prevent is when running addService via the cron in case the API is rate limited and there is no response is it possible to skip the cron run, by skip i mean to skip this run and run it again on the next cron run?

 

Link to comment
Share on other sites

In that case, your module should set Input errors because it cannot provision the service remotely at that time. When your module's addService or editService is called, but you cannot add or edit the service, set errors and return:

$this->Input->setErrors(['error' => 'Enter your error description here']);
return;

 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...