<html>
  <head>

    <meta http-equiv="content-type" content="text/html; charset=ISO-8859-1">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <font face="Helvetica, Arial, sans-serif">I'm in the process of
      implementing the first user story, Delayed Launch, per the Redmine
      page below [1]. I've pulled out the relevant section of the page
      for quick reference below.&nbsp; I'm also adding what views I believe
      will be edited along the way.&nbsp; I figure soliciting comments and
      suggestions before getting too far is a good idea...<br>
      <br>
      ---<br>
      <br>
      User Story:<br>
      1. As a user I want to launch a deployment at a specified time.<br>
      <br>
      Delayed_job can be used for this (we already have it integrated).
      It could work as follows:<br>
      1. a user sets launch time on a deployment launch page<br>
      2. after checking permissions (same as for common launching),
      deployment+instances objects are created in conductor's DB (both
      deployment and instances stay in 'NEW' state)<br>
      3. we check if match is found at this point, if not, warning is
      displayed to user, but he is allowed to continue in delayed launch<br>
      4. launch request is queued in delayed_job queue with appropriate
      delay (delay = current time - launch time set by user)<br>
      5. delayed_job invokes launch request which: checks again
      permissions, finds a match and launches the deployment. If match
      is not found, deployment is not deleted but failed status is set
      both for deployment and instances.<br>
      <br>
      Deployment model in conductor would be extended with attribute
      "launch_at", this attribute would be set for delayed launches and
      would be displayed in UI.<br>
      <br>
      Deployments which are waiting for launch can be deleted, in such
      case delayed_job's job should be removed from queue -&gt; another
      "job_id" attribute would be needed for keeping this id.<br>
      <br>
      Deployments which are waiting for launch can have their launch
      time edited.&nbsp; One of two scenario's would occur then:<br>
      1. Update the delay of the job in the queue of delayed_job<br>
      2. Duplicate the request currently queued in delayed_job, issue a
      new request to delayed_job and delete the original request.<br>
      Both of these scenarios would also require a "job_id" attribute be
      created to keep the delayed_job id.<br>
      <br>
      <br>
      <br>
      Views<br>
      - src/app/views/deployments/_launch_new.html.haml<br>
      - src/app/views/deployments/launch_time_params.html.haml<br>
      - src/app/views/deployments/_deployment_card_index.html.mustache<br>
      - src/app/views/deployments/show.html.haml<br>
      - src/app/views/instances/_instance_card.html.mustache<br>
      - src/app/views/deployments/_edit.html.haml<br>
      <br>
      <br>
      [1]
<a class="moz-txt-link-freetext" href="https://redmine.aeolusproject.org/redmine/projects/aeolus/wiki/Scheduleddelayed_launch_and_maximum_execution_time">https://redmine.aeolusproject.org/redmine/projects/aeolus/wiki/Scheduleddelayed_launch_and_maximum_execution_time</a><br>
      <br>
    </font>
  </body>
</html>