예제 #1
0
void JobContainer::updateTaskState( af::MCTaskUp &taskup, RenderContainer * renders, MonitorContainer * monitoring)
{
    switch( taskup.getStatus())
    {
    case af::TaskExec::UPNULL:
    case af::TaskExec::UPNoTaskRunning:
    case af::TaskExec::UPNoJob:
    case af::TaskExec::UPLAST:
        AFERRAR("JobContainer::updateTaskState: Bad task update status (jobID=%d).\n", taskup.getNumJob());
    return;
    }

    JobContainerIt jobsIt( this);
    JobAf* job = jobsIt.getJob( taskup.getNumJob());
    if( job != NULL )
    {
        job->v_updateTaskState( taskup, renders, monitoring);
        return;
    }

    // Job does not exist!
    AFERRAR("JobContainer::updateTaskState: Job with id=%d does not exists.", taskup.getNumJob())
            if( taskup.getStatus() == af::TaskExec::UPPercent) RenderAf::closeLostTask( taskup);
}
예제 #2
0
파일: listjobs.cpp 프로젝트: code-cg/cgru
bool ListJobs::v_filesReceived( const af::MCTaskUp & i_taskup )
{
	if(( i_taskup.getNumBlock() != -1 ) || ( i_taskup.getNumTask() != -1 ))
		return false; // This is for a task (not for an entire job)

	for( int i = 0; i < count(); i++)
	{
		ItemJob * itemjob = (ItemJob*)(m_model->item(i));
		if( itemjob->getId() == i_taskup.getNumJob() )
		{
			itemjob->v_filesReceived( i_taskup);
			
			return true;
		}
	}

	return false;
}