Beispiel #1
0
void ServerObject::jobFailed(const QString& str, QThread* thread)
{
	Thread* thr = (Thread*)thread;
	WorkItem *nextItem;
	if (unpaused) 
	{
		//jobs->renderFailed(((Thread*)thread)->getInfo());
		uint jobid;
		nextItem = jobs->getItem(&jobid);
		
		
		// here is where we queue in the next job in the list
		if (nextItem) {
			emit finished(thr->getHost().append(" ").append(str));
			thr->setJobId(jobid);
			thr->setJobName(nextItem->getJob()->getJobName());
			thr->setInfo(nextItem);
			thr->start();
		}
		else{
			emit finished(thr->getHost().append(" ").append(str));
			emit finished(tr("All jobs finished on ").append(thr->getHost()));
		}
	}
	else {
		emit finished(thr->getHost().append(" ").append("paused"));
	}
}
Beispiel #2
0
void ServerObject::connected(const QString& str, const QThread* thr)
{
	emit connectChange(str);
	Thread* thread = (Thread*)thr;
	WorkItem *nextItem;
	if (started) {
		thread->setReady(true);
		uint jobid;
		nextItem = jobs->getItem(&jobid);
		if (nextItem) {
			thread->setJobId(jobid);
			thread->setJobName(nextItem->getJob()->getJobName());
			thread->setInfo(nextItem);
			thread->start();
		}
	}
	else
		thread->setReady(true);
}