Package com.heroku.api.request.run

Examples of com.heroku.api.request.run.Run


     * Run a one-off process on a Heroku dyno.
     * @param appName App name. See {@link #listApps} for a list of apps that can be used.
     * @param command Bash command to run inside a dyno. See <a href="http://devcenter.heroku.com/articles/oneoff-admin-ps">One-off processes</a>.
     */
    public void run(String appName, String command) {
        connection.execute(new Run(appName, command), apiKey);
    }
View Full Code Here


     * @param appName App name. See {@link #listApps} for a list of apps that can be used.
     * @param command Bash command to run inside a dyno. See <a href="http://devcenter.heroku.com/articles/oneoff-admin-ps">One-off processes</a>.
     * @return
     */
    public RunResponse runAttached(String appName, String command) {
        return connection.execute(new Run(appName, command, true), apiKey);
    }
View Full Code Here

    @Test(dataProvider = "app", retryAnalyzer = InternalServerErrorAnalyzer.class)
    public void testProcessCommand(App app) {
        Proc proc = null;
        try {
            final RunResponse runResponse = connection.execute(new Run(app.getName(), "sleep 60", false), apiKey);
            proc = runResponse.getProc();

            List<Proc> response = connection.execute(new ProcessList(app.getName()), apiKey);
            assertEquals(response.size(), 1);
            assertEquals(response.get(0).getProcess(), proc.getProcess());
View Full Code Here

        assertNotNull(xmlArrayResponse.get(0).getEmail());
    }

    @Test(dataProvider = "app", retryAnalyzer = InternalServerErrorAnalyzer.class)
    public void testRunCommand(App app) throws IOException {
        Run run = new Run(app.getName(), "echo helloworld");
        Run runAttached = new Run(app.getName(), "echo helloworld", true);
        RunResponse response = connection.execute(run, apiKey);
        try {
            response.attach();
            fail("Should throw an illegal state exception");
        } catch (IllegalStateException ex) {
View Full Code Here

TOP

Related Classes of com.heroku.api.request.run.Run

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.