• Resolved Jon Brown

    (@jb510)


    Under Tools->EWWW Image Optimizer, there is an option to Delete Originals.

    When I run this, it runs for hours and hours but eventually fails. When I restart it, it starts again a 1/173996 and again runs for hours and hours before failing.

    It’s strange because optimization routines will restart where they left off (and they run more realiably).

    How do I get it to delete originals beyond for first 10k?

    I thought maybe I could find a way to force increment via JS, but haven’t succeeded in that.

Viewing 8 replies - 1 through 8 (of 8 total)
  • Plugin Author nosilver4u

    (@nosilver4u)

    It seems like I built resume capability into some of the other tools, so I’ll have to check on that and see why it doesn’t resume. I’ll also see if there is a way to trick it into starting from a certain image.

    Thread Starter Jon Brown

    (@jb510)

    TY. Reviewing the code I see it gets an array of all the Media IDs, then steps through those. I think I understand why it goes about it that way. You don’t otherwise have a log optimized images to reliably step through.

    But, yeah, a way to forcibly start at a particular ID would be welcome. This is the 5th time I’ve gotten to around 13571/173997… and it’s just dead.

    I thought maybe I could just drop into the JS console and increment the index, but I can’t quite figure out how to do that.

    • This reply was modified 2 years, 9 months ago by Jon Brown.
    Plugin Author nosilver4u

    (@nosilver4u)

    Yeah, I didn’t find any way of resuming either. It’s fully AJAX-driven, grabs every attachment, and then just walks through them each time. It’s not even using an index, what it does is use the .pop() method in JS to remove+return an attachment ID from the array. Super simple code that works fine, until it falls over.
    Any failure halts execution, unlike the main bulk optimizer that has auto-retry and resume built-in. I think all we would have to do is have a progress “option” that tracks which ID was last completed (which is how some of the other tools do it), and then the “all attachments” query would look for IDs above/below that, I’d have to refresh my memory which direction it goes.

    Plugin Author nosilver4u

    (@nosilver4u)

    Alright, resume function is build, code is on GitHub if you want to try it out: https://docs.ewww.io/article/73-update-from-github
    Otherwise, it’ll be included in the 6.2 release.

    Thread Starter Jon Brown

    (@jb510)

    TY. Giving this a try.

    It seems like what it does is on restart it have fewer total images than the first time. This works, but I don’t think it’s the most obvious thing for the user.

    What I means is it starts at
    0/100,123
    runs through to 10,000
    If it’s interrupted at that point and restarted, it then displays
    0/90,123

    I’m happy that works.

    Just worth noting my expectation as a user was that it would restart at
    10,000/100,000 and progress from there.

    Not a big deal as long as it works (which so far it seems to).

    • This reply was modified 2 years, 9 months ago by Jon Brown.
    • This reply was modified 2 years, 9 months ago by Jon Brown.
    Plugin Author nosilver4u

    (@nosilver4u)

    Yeah, totally understandable, and if I think of an easy way to make that happen, I’ll see if I can tweak that. For now, I’m just glad we got it working 🙂

    Thread Starter Jon Brown

    (@jb510)

    @nosilver4u one other suggestion… the tools pages really ought to say what is tool is running, ie say “Deleting Originals” somewhere on the page while it’s running.

    Plugin Author nosilver4u

    (@nosilver4u)

    Ooh, that’s a good idea, I’ve always felt it was too sparse 🙂

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Delete Originals’ is closed to new replies.