Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add ->modified_files, deprecate ->check #931

Merged
merged 1 commit into from Mar 8, 2016
Merged

add ->modified_files, deprecate ->check #931

merged 1 commit into from Mar 8, 2016

Conversation

leejo
Copy link
Contributor

@leejo leejo commented Mar 8, 2016

Squashed commit of the following:

commit a210794ca2b27848fb03857be131b4a24b771899
Author: Lee Johnson lee@givengain.ch
Date: Tue Mar 8 09:28:24 2016 +0100

add ->modified_files, deprecate ->check

in Mojo::Server::Morbo - allows retrieval of entire list of files
changed (or undef) preventing morbo getting into a restart loop if
many files have changed. ->check is now redundant so deprecated

update tests in t/mojo/morbo.t tp reflect above changes

commit 3345a9d
Author: Andrew Nugged nugged@gmail.com
Date: Mon Mar 7 23:00:19 2016 +0200

Handle multiple changed files at once for restart

If you change numerous files at once or one-by-one in second(s),
Morbo saw first file changed and tried to restart right away
(though meanwhile restart process started, it can catch few files
more on next "sleep 1"), but then after restart Morbo finds next one
or next few changed files, not updated in cache, and restarts again
until all cached files iterated.

That causes Morbo to restart many times if you, for example, do checkout
for git branch where many files different or upload/sync pack of files
through sftp at once, etc.

Changes in code: now changed files names packed in array in one pass,
not returning after first met, and only returning that array. That
updates cache for all files, then calls restart.

Also notification message printed to console with one file name if only
one changed, that is for our usual work mode (when we uploaded one file
from editor), or give number of changed files only if we do mass change
(branch checkout, mass sync).

Squashed commit of the following:

commit a210794ca2b27848fb03857be131b4a24b771899
Author: Lee Johnson <lee@givengain.ch>
Date:   Tue Mar 8 09:28:24 2016 +0100

    add ->modified_files, deprecate ->check

    in Mojo::Server::Morbo - allows retrieval of entire list of files
    changed (or undef) preventing morbo getting into a restart loop if
    many files have changed. ->check is now redundant so deprecated

    update tests in t/mojo/morbo.t tp reflect above changes

commit 3345a9d
Author: Andrew Nugged <nugged@gmail.com>
Date:   Mon Mar 7 23:00:19 2016 +0200

    Handle multiple changed files at once for restart

    If you change numerous files at once or one-by-one in second(s),
    Morbo saw first file changed and tried to restart right away
    (though meanwhile restart process started, it can catch few files
    more on next "sleep 1"), but then after restart Morbo finds next one
    or next few changed files, not updated in cache, and restarts again
    until all cached files iterated.

    That causes Morbo to restart many times if you, for example, do checkout
    for git branch where many files different or upload/sync pack of files
    through sftp at once, etc.

    Changes in code: now changed files names packed in array in one pass,
    not returning after first met, and only returning that array. That
    updates cache for all files, then calls restart.

    Also notification message printed to console with one file name if only
    one changed, that is for our usual work mode (when we uploaded one file
    from editor), or give number of changed files only if we do mass change
    (branch checkout, mass sync).
kraih added a commit that referenced this pull request Mar 8, 2016
…_restart_SQUASHED

add ->modified_files, deprecate ->check
@kraih kraih merged commit 4cdc302 into mojolicious:master Mar 8, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants