Skip to content

Stream progress events to a known file #95

Closed

Description

@joshaber

The clean, smudge, and push should stream their progress to some known file which clients can then tail to report progress to users.

Activity

  1. technoweenie commented on Jul 30, 2014

    @technoweenie
    Contributor

    Any thoughts on passing the file you want to it? Maybe setting some ENV var. Otherwise I'd worry about simultaneous commands streaming to the same file.

  2. joshaber commented on Jul 30, 2014

    @joshaber
    Author

    Yeah that seems like a good idea. ENV sounds legit.

  3. technoweenie commented on Aug 6, 2014

    @technoweenie
    Contributor

    What kind of progress do you want? I'm not sure progress bars will work, because the terminal is updating the bar in place, and not streaming data. Not sure how you'd do the same with a file.

  4. joshaber commented on Aug 6, 2014

    @joshaber
    Author

    That's fine, a progress bar would be a pain in the ass to parse anyways.

    I think for the UI, we'd want to know:

    1. File currently downloading.
    2. File progress (float 0-1 or 0-100)
    3. Overall progress (File 2 out of 7)

    Maybe something like:

    1/2 my-image.jpg 0
    1/2 my-image.jpg 50
    1/2 my-image.jpg 100
    2/2 other-image.jpg 0
    2/2 other-image.jpg 25
    2/2 other-image.jpg 100
    
  5. technoweenie commented on Aug 6, 2014

    @technoweenie
    Contributor

    So git media smudge is dumb, and doesn't really know how many files it needs to scan. It just gets called one at a time by git.

    I can probably do just:

    my-image.jpg 0
    my-image.jpg 50
    my-image.jpg 100
    other-image.jpg 0
    other-image.jpg 25
    other-image.jpg 100
    
  6. joshaber commented on Aug 6, 2014

    @joshaber
    Author

    Ah, right. That'll do 👍

  7. technoweenie commented on Aug 6, 2014

    @technoweenie
    Contributor

    If you read the STDOUT of git clone, it tells you how many files. Though not sure how that looks to a stream reader:

    $ git clone https://github.com/github/gitmediatest
    Cloning into 'gitmediatest'...
    remote: Counting objects: 61, done.
    remote: Compressing objects: 100% (34/34), done.
    remote: Total 61 (delta 20), reused 60 (delta 20)
    Unpacking objects: 100% (61/61), done.
    Checking connectivity... done.
    Checking out files:  46% (6/13)   
    

    Also, I'm guessing that's 13 files total, not just git media or whatever.

  8. joshaber commented on Aug 6, 2014

    @joshaber
    Author

    Yeah we already scrape all that stuff. We'll just have to figure out a way to correlate it with the progress stream from git media.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions