Skip to content

Reporting from long running commands #190

@jbutkus

Description

@jbutkus

Would it be possible to get some reporting from terminus for long running commands?

Right now our approach is as follows:

  • pantheon-site-create - keep cURL'ing page until we see desired response in HTML;
  • pantheon-site-service-level - we assume that change is immediate and proceed almost immediately (giving it 60 seconds); we think it may actually take longer, as, when you switch to >=Business server second container must be started;
  • pantheon-site-deploy - our approach is the same as with pantheon-site-create;
  • terminus wp db query - if we replace a significant portion of the database we check for the output; but again, with >=Business plan levels it may not be true, as cache might be cleared only on one server by that time and it might be wise to wait a bit more.

We think our cURL approach is sound. But then we would like to get reports from Pantheon. Like a Yes/No response to a query "has pantheon-site-create completed".

This would save some trouble for both parties, I think. As now we pre-heat edge servers with these requests and that cache has to be purged once command truly succeeds.

Then our assumptions may be wrong, because we re-try cURL'ing for no more than 4 minutes for a single command. I guess that this might be too low during peak times and then we just abandon the process entirely instead of waiting a bit longer. And, contrary, we cannot keep re-querying page forever, as some commands might have failed and it would be better to try to restart process from the very beginning instead of waiting more.

Does this sound reasonable? I can provide some more details on how we use these scripts if it would help anyhow.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions