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 -AsJob Parameter to New-Flancy #25

Open
adamdriscoll opened this issue Nov 4, 2015 · 4 comments
Open

Add -AsJob Parameter to New-Flancy #25

adamdriscoll opened this issue Nov 4, 2015 · 4 comments

Comments

@adamdriscoll
Copy link
Contributor

Would be nice to just tack on an -AsJob parameter so that we can out-of-proc the Nancy host to make it easier to run subsequent New-Flancy calls.

@toenuff
Copy link
Owner

toenuff commented Nov 4, 2015

I tried it, but there were some issues.

@beatcracker
Copy link
Contributor

@toenuff What issues? I'm running Flancy like this and it's working ok:

# Start Flancy
Start-Job -Name Flancy -ScriptBlock {
    Import-Module -Name 'Flancy' -ErrorAction Stop
    New-Flancy -url $Url -webschema @(
        @{
            path   = '/'
            method = 'Get'
            script = {'Test!'}
        }
    )
    while($true){Start-Sleep -Seconds 1}
    } -ArgumentList $Url
}

# Stop Flancy
Get-Job Flancy | Stop-Job -PassThru | Remove-Job

Should be fairly easy to add something like this to the New-Flancy...

@toenuff
Copy link
Owner

toenuff commented Nov 4, 2015

I had the problem either in tests or by changing the compiled flancy. It may have just been an ordered thing. We should definitely revisit. It would be nice to be able to run multiple flancies in a session.

@toenuff
Copy link
Owner

toenuff commented Dec 6, 2015

I think we have all the issues resolved now - just need to implement as per #33

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

No branches or pull requests

3 participants