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

PrepareQuery callback never firing #126

Closed
tanner0101 opened this issue Feb 20, 2018 · 2 comments
Closed

PrepareQuery callback never firing #126

tanner0101 opened this issue Feb 20, 2018 · 2 comments
Assignees
Labels
bug Something isn't working

Comments

@tanner0101
Copy link
Member

Tracking down an issue where model.save(...) is never completing (for a complex route).

Looks like callback parameter to PrepareQuery is never firing.

screen shot 2018-02-19 at 7 14 48 pm
screen shot 2018-02-19 at 7 14 53 pm

Expected output would be:

START preparing
done preparing

hangtest.zip

Zip file attached can be used to re-create. Note you will need to add this hack:

extension Router {
    /// Creates a `Route` at the provided path using the `PUT` method.
    ///
    /// [Learn More →](https://docs.vapor.codes/3.0/getting-started/routing/)
    @discardableResult
    func get<C, T>(
        _ content: C.Type,
        at path: PathComponent...,
        use closure: @escaping RequestDecodableResponder<C, T>.Closure
    ) -> Route<Responder> where C: RequestDecodable, T: ResponseEncodable {
        let responder = RequestDecodableResponder(closure: closure)
        let route = Route<Responder>(
            path: [.constants([.bytes(HTTPMethod.get.bytes)])] + path,
            output: responder
        )
        self.register(route: route)
        return route
    }
}

You will also need test_user:test_user@testdb configured as a MySQL user w/ full rights.

@tanner0101 tanner0101 added the bug Something isn't working label Feb 20, 2018
@SandorDobi
Copy link
Contributor

this is fixed here @ #127

@Joannis
Copy link
Member

Joannis commented Feb 22, 2018

Merged #127

@Joannis Joannis closed this as completed Feb 22, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants