oveits / ProvisioningEngine

Ruby on Rails based ProvisioningEngine Frontend for provisioning of legacy systems via Apache Camel Backend (SOAP/XML+SPML+File import)
3 stars 6 forks source link

Migrate the old style delayed_job delivery to ActiveJob delivery #45

Open oveits opened 8 years ago

oveits commented 8 years ago

In the moment, I am running two different approaches for delivering background jobs:

1) provision, delete/de-provision and read are performed via old style Provisioning.deliver method, which directly calls delayed_jobs. 2) synchronize is performed via new style GeneralJob.perform_later(...) method. The Provisioning model is used only for persistently saving the job to the database for later reference. Provisioning's deliver method is not called.

I need to find a one method fits all solution. Two possibilities:

A) Migrate old style to new style B) change new style: e.g. call GeneralJob.perform_later within the Provisioning.deliver method (might be the better choice? This is to be discussed).

TODO: 1) Find best solution between A) and B) above. 2) Work on GeneralJob+Provisioning model cleaning topics like follows:

The change is non-functional only with no impact on the service, so the prio could be set to low. However, it needs to be done in order to keep the code maintenable. Therefore, I raise it to normal prio.