Optimize drush command

Created on 18 March 2021, about 4 years ago
Updated 29 December 2022, over 2 years ago

Problem/Motivation

The introduced drush command image-style-warmer:warm-up from 8.x-1.1 release should get some improvements:

  • Option to load only files with a specific file mime type.
  • Option to set image style(s) which should be generated/queued during warm up.
  • Option to order loading of files by created date (default: DESC = newest first).
  • Only load permanent files from database.

Steps to reproduce

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

Feature request
Status

Needs review

Version

1.0

Component

Code

Created by

🇩🇪Germany IT-Cru Munich

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • Merge request !7Issue #3204351: Optimize drush command → (Open) created by IT-Cru
  • Open in Jenkins → Open on Drupal.org →
    Core: 9.5.x + Environment: PHP 8.0 & MySQL 5.7
    last update about 2 years ago
    10 pass, 1 fail
  • 🇨🇦Canada jigarius Montréal

    I was about to create a similar issue but I found this one. I have ~48,000 files and the Drush command never manages to reach till the end. Hopefully, the solution to this issue will solve my problem.

    To avoid having a huge number of items inserted into a batch, it might be more efficient to store a highwater mark. For example:

    * Batch starts with "position = 0"
    * Load, say, 50 file entities where fid > 0.
    * Process the files and after processing each file, set the position to "fid" for that file.
    * Keep repeating 1 and 2 until step 2 returns an empty result, which means all files are processed.

    This approach should be able to tackle any number of records without spending additional resources to create an initial "list of tasks".

    PS: I haven't had the opportunity to see the open pull request yet.

  • Open in Jenkins → Open on Drupal.org →
    Core: 10.2.1 + Environment: PHP 8.1 & MySQL 8
    last update about 1 year ago
    10 pass, 1 fail
  • Pipeline finished with Failed
    about 1 year ago
    Total: 166s
    #190939
  • Open in Jenkins → Open on Drupal.org →
    Core: 10.2.1 + Environment: PHP 8.1 & MySQL 8
    last update about 1 year ago
    10 pass, 1 fail
  • Pipeline finished with Failed
    about 1 year ago
    Total: 173s
    #192348
  • Open in Jenkins → Open on Drupal.org →
    Core: 10.2.1 + Environment: PHP 8.1 & MySQL 8
    last update about 1 year ago
    12 pass
  • Pipeline finished with Success
    about 1 year ago
    Total: 172s
    #192416
  • 🇫🇮Finland sokru

    Updated the tests and added the two missing features from summary:

    • Option to order loading of files by created date (default: DESC = newest first).
    • Only load permanent files from database.

    Reverted the changes to logging made by @DieterHolvoet, I think in overall the logging would need a bit more sophisticated approach, but I'd leave it as a follow-up issue.

  • Open in Jenkins → Open on Drupal.org →
    Core: 10.2.1 + Environment: PHP 8.1 & MySQL 8
    last update 12 months ago
    12 pass
  • Pipeline finished with Success
    12 months ago
    Total: 174s
    #194691
  • 🇩🇪Germany IT-Cru Munich

    We also should try to add new Drush command options to PHPUnit testing or open a related issue for this.

  • Open in Jenkins → Open on Drupal.org →
    Core: 10.2.1 + Environment: PHP 8.1 & MySQL 8
    last update 12 months ago
    12 pass
  • Pipeline finished with Success
    12 months ago
    Total: 165s
    #196334
  • Open in Jenkins → Open on Drupal.org →
    Core: 10.2.1 + Environment: PHP 8.1 & MySQL 8
    last update 12 months ago
    12 pass
  • Pipeline finished with Success
    12 months ago
    Total: 172s
    #196340
  • 🇫🇮Finland sokru

    sokru changed the visibility of the branch image_style_warmer-3204351-3204351-optimize-drush-command to hidden.

  • Open in Jenkins → Open on Drupal.org →
    Core: 10.2.1 + Environment: PHP 8.1 & MySQL 8
    last update 12 months ago
    13 pass
  • Pipeline finished with Success
    12 months ago
    Total: 177s
    #196542
  • 🇫🇮Finland sokru

    Added few tests on this MR !7.

  • 🇨🇦Canada mikeohara Moncton, NB

    Should the README also be updated to include an overview of the drush command, especially since it's being enhanced here?

  • 🇩🇪Germany IT-Cru Munich

    @mikeohara: Sounds valid to me.

    I think in the near future Image Style Warmer should also get some Gitlab doc pages.

  • Pipeline finished with Failed
    8 months ago
    Total: 41s
    #316121
  • 🇧🇪Belgium matthieu_collet

    Hi
    I try to use all you talk about here, but where is the doc to know how to use drush with ID asc and other options ?
    I don't see anything in hte readme or elsewhere

    thank you

  • First commit to issue fork.
  • 🇪🇸Spain rcodina Barcelona

    Just made some commits to fix the pipeline.

Production build 0.71.5 2024