Skip to content
This repository has been archived by the owner on Jan 25, 2024. It is now read-only.

Resume sync when interrupted, not start all over again. #40

Open
Toximik opened this issue May 12, 2021 · 5 comments
Open

Resume sync when interrupted, not start all over again. #40

Toximik opened this issue May 12, 2021 · 5 comments
Labels
enhancement New feature or request question Further information is requested

Comments

@Toximik
Copy link

Toximik commented May 12, 2021

Hi,

I have run into a problem with syncing task, which can stuck in an infinite loop and it uploads files to the AWS bucket over and over again. This occurs when static files are big and execution time is short. I can't change execution time or shrink static data.

Also, it would be great, if the deploy sequence can be canceled by some button, not by deactivation plugin.

@Toximik Toximik changed the title Resume sync when interuputed, not start all over again. Resume sync when interrupted, not start all over again. May 12, 2021
@HammenWS
Copy link
Member

@Toximik Could you please inform me with the specific version you use of this plugin?

@Toximik
Copy link
Author

Toximik commented May 17, 2021

I'm using version 2.1.0 of your plugin with Wordpress 5.7.1 on PHP 7.4.16.

@HammenWS HammenWS added the enhancement New feature or request label May 19, 2021
@HammenWS
Copy link
Member

@Toximik

We are working on some performance improvements (for instance, only deploying a certain branch of the website), but I haven't seen any issues with the s3 syncing task yet.

For now you should be able to cancel the job with the cancel button from the Simply Static plugin (the required plugin for Simply Static Deploy to work).

I wonder how big your static generated site bundle is. And does this bundle includes uploaded images? For uploading images I would suggest a media offloading plugin such as ['WP Offload Media Lite for Amazon S3, DigitalOcean Spaces, and Google Cloud Storage'])https://wordpress.org/plugins/amazon-s3-and-cloudfront/), this way the uploads won't be part of the static generated site.

@HammenWS HammenWS added the question Further information is requested label May 19, 2021
@Toximik
Copy link
Author

Toximik commented May 19, 2021

Thanks for the tip about offloading images. Currently, images are included in the static bundle, which is around 200 MB. Even if I increase concurrency to 10 at TransferManager, 60 seconds is not enough to upload the whole bundle. It took me quite a lot of time to figure out where is the problem, because there wasn't any error. It would be great if the plugin can somehow detect, when is current task runs out of execution time. I know, that it isn't an easy task to detect this problem.

The cancel button has disappeared after activating your plugin. It is accessible only if I deactivate your plugin.

I find a way how to deal with the problem for now. I have expanded your plugin with two other tasks, which are executed before the main S3 sync. The first task sync wp-content to S3 and the second task delete wp-content dir, then the rest of the bundle is synced (now without wp-content dir). This workaround works for me for now, even if it isn't the most elegant way to do it.

@HammenWS
Copy link
Member

HammenWS commented May 19, 2021

@Toximik I would suggest using v2.0.7.

~2.1 is actually not ready the way we like it. I should make a comment about that in the readme.

The cancel button has disappeared after activating your plugin.

Like this feature that was added in ~2.1. We have added it because client were still using that button to generate the site instead our deploy button.

Thanks a lot for your feedback.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants