Jump to content
Sign in to follow this  
Julien

Dealing with pending operation

Recommended Posts

Hello everyone,

I'm actually  working on a Registrar module and I would like some opinion on how to deal with pending operations. By that I mean maybe someone want's to order a domain name but the process can take between 0 seconds to a few days if technical issues arises,  and so our server might respond with an indication that the operation is pending, meaning it will be resolved but it's not instantaneous.

My line of thought would be to issue a warning/error when such an operation arise, saying something like 'Operation is being processed' or something close.
Then running a cron job that check our API if the operation is still pending or failed or is successful,  and then altering the DB in case of success.

My questions are:

- Did I oversee some crucials steps in this process?

- Could you point me to the table in the database that I might need to read/edit for this process to succeed?

- Is there a way to raise an actual warning? Not an error but a real warning?  For error I use $this->Input->setErrors, is

It's not a very clear question as I'm still thinking about it, any feedback would be appreciated.
And forgive me for my English.

Julien

 

Edit1: Also in documentation  it  talk about cron configuration only for plugins, not for modules. Will I run into any problem?

Edit2: I discovered this thread about  cron for module, I asked there if there were any news.

Share this post


Link to post
Share on other sites

When Blesta provisions a service and attempts to use your module to register a domain, it expects that the service be made active, so the module should create the domain and return success, or not create the domain and return failure. So you should determine whether the registrar creates the domain on the account regardless of any technical issues that might arise which they will later attempt to resolve.

Share this post


Link to post
Share on other sites
2 hours ago, Tyson said:

When Blesta provisions a service and attempts to use your module to register a domain

It a 5 min interval, if the registrar take days to activate he will come with email error every 5 mins. His inbox will become bomberder from blesta.

 

Share this post


Link to post
Share on other sites
On 01/02/2018 at 9:57 AM, Julien said:

I'm actually  working on a Registrar module and I would like some opinion on how to deal with pending operations. By that I mean maybe someone want's to order a domain name but the process can take between 0 seconds to a few days if technical issues arises,  and so our server might respond with an indication that the operation is pending, meaning it will be resolved but it's not instantaneous.

My line of thought would be to issue a warning/error when such an operation arise, saying something like 'Operation is being processed' or something close.
Then running a cron job that check our API if the operation is still pending or failed or is successful,  and then altering the DB in case of success.

the best approuch to add the service, then show a message if is not yet active .

create a plugin that use cron to check the domain if active or not, after it activated then sync renew date if needed.

Share this post


Link to post
Share on other sites

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
Sign in to follow this  

×