Julien Posted February 1, 2018 Report Posted February 1, 2018 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. Quote
Tyson Posted February 2, 2018 Report Posted February 2, 2018 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. Michael and Julien 1 1 Quote
activa Posted February 3, 2018 Report Posted February 3, 2018 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. Julien 1 Quote
Blesta Addons Posted February 3, 2018 Report Posted February 3, 2018 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. Julien 1 Quote
Julien Posted February 7, 2018 Author Report Posted February 7, 2018 Thank you for the replies. I was hoping to not have to do a plugin but I guess for now that's the route to go. Thanks all for your inputs, I do really appreciate it. activa 1 Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.