acsf-tools icon indicating copy to clipboard operation
acsf-tools copied to clipboard

Feature Request: Allow to skip the commands on sites which are under maintenance

Open nikunjkotecha opened this issue 4 years ago • 2 comments

Add a flag in commands like sfml and sfmlc to filter the sites under maintenance

Example: drush sfml status --maintenance-check

Example purposes:

  • We want to sync data from external system for only the sites which are live
  • We want to generate sitemap for only the sites which are live

nikunjkotecha avatar Nov 28 '20 05:11 nikunjkotecha

I am wondering if we should do something more generic as there is already multiple exclude options. Should we have an argument which is a php-eval argument and so is executed on each site before executing the acsf-tools-ml (or acsf-tools-mlc) command.

Something like drush acsf-tools-ml sapi-i my_index --exclude-query="cget maintenance_mode" --exclude-result="1" (this is really just an example argument name/format/... can vary, it just to show the idea of generic argument). I am not sure how easy it would be to implement something generic enough to allow cget and sqlq at least.

vbouchet31 avatar Nov 30 '20 07:11 vbouchet31

Supporting quotes properly is already a pain in normal case so I am afraid that eval here would be even worse. I think I would stick to initial suggestion from Nikunj.

sdelbosc avatar Dec 30 '20 16:12 sdelbosc