2
* UGENE - Integrated Bioinformatics Tools.
3
* Copyright (C) 2008-2011 UniPro <ugene@unipro.ru>
4
* http://ugene.unipro.ru
6
* This program is free software; you can redistribute it and/or
7
* modify it under the terms of the GNU General Public License
8
* as published by the Free Software Foundation; either version 2
9
* of the License, or (at your option) any later version.
11
* This program is distributed in the hope that it will be useful,
12
* but WITHOUT ANY WARRANTY; without even the implied warranty of
13
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14
* GNU General Public License for more details.
16
* You should have received a copy of the GNU General Public License
17
* along with this program; if not, write to the Free Software
18
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
22
#ifndef _U2_REMOTE_WORKFLOW_RUN_TASK_H_
23
#define _U2_REMOTE_WORKFLOW_RUN_TASK_H_
25
#include <U2Core/VirtualFileSystem.h>
26
#include <U2Remote/RemoteMachine.h>
28
#include <U2Lang/Schema.h>
29
#include <U2Lang/RunSchemaForTask.h>
31
#include <QtCore/QEventLoop>
36
using namespace Workflow;
38
class U2REMOTE_EXPORT RemoteWorkflowRunTask : public Task {
41
RemoteWorkflowRunTask( RemoteMachineSettings *m, const Schema & sc, const QList<Iteration> & its );
42
RemoteWorkflowRunTask( RemoteMachineSettings *m, qint64 remoteTaskId);
43
~RemoteWorkflowRunTask();
45
static const int TIMER_UPDATE_TIME = 2000; /* 2 seconds */
46
static const int REMOTE_TASK_TIMEOUT = 30000;
48
virtual void prepare();
50
QString generateReport() const;
51
virtual ReportResult report();
52
qint64 getRemoteTaskId() { return taskId; }
55
void preprocessSchema();
56
static void dumpSchema(const QString& fileName, const QByteArray& schema);
59
void sl_remoteTaskTimerUpdate();
62
RemoteMachineSettings* machineSettings;
63
RemoteMachine * machine;
65
QList<Iteration> iterations;
67
QEventLoop* eventLoop;
68
QStringList outputUrls;
69
QVariantMap taskSettings;
70
// Task is running or enqueued on remote machine already
73
}; // RemoteWorkflowRunTask
77
#endif // _U2_REMOTE_WORKFLOW_RUN_TASK_H_