コード例 #1
0
ファイル: SMB_DispatchGMS.py プロジェクト: supergis/SMPP
def dispatchJobs(ch):
	fileTemplate = r".\\Template\T_Shader.gms"	
	strDataPath = r"H:\SRTM\SRTM_GMG_ALL"
	strRenderName = r"GeoRender01"
	
	strOutputFilePath = MakeDir(r"H:\SRTM",strRenderName)	
	strGMSPath = MakeDir(strOutputFilePath,"GMS")
	strLogPath = MakeDir(strOutputFilePath,"log")

	flist = SMUP_Image.scanPathAll(strDataPath)
	for f in flist:
		print ""
		print datetime.now(), "处理文件: ",f
		strFilePathName = f
		str_GMSPathFile = buildGMS(fileTemplate,strFilePathName,
			strGMSPath,strLogPath,strRenderName,strOutputFilePath)
		job = buildJob(str_GMSPathFile)
		SMB_Dispatch.send_job(job)
		print "已经提交: ",job
def Status_test(job):
    tStart = datetime.now()
    for i in range(0, 1000):
        #print "[",datetime.now(),"]", "TEST sendStatus:", i
        SMB_Dispatch.sendStatus("Dispatch_test sendStatus: %s" % i)
    tEnd = datetime.now()

    strTestInfo = "TEST Time:%s [%s]--[%s]" % (i, tStart, tEnd)
    print strTestInfo

    SMB_Dispatch.sendStatus(strTestInfo)
    SMB_Dispatch.close()
コード例 #3
0
ファイル: SMB_Status_Test.py プロジェクト: supergis/SMPP
def Status_test(job):
    tStart = datetime.now()
    for i in range(0, 1000):
        # print "[",datetime.now(),"]", "TEST sendStatus:", i
        SMB_Dispatch.sendStatus("Dispatch_test sendStatus: %s" % i)
    tEnd = datetime.now()

    strTestInfo = "TEST Time:%s [%s]--[%s]" % (i, tStart, tEnd)
    print strTestInfo

    SMB_Dispatch.sendStatus(strTestInfo)
    SMB_Dispatch.close()
コード例 #4
0
ファイル: SMB_DispatchJob.py プロジェクト: supergis/SMPP
def dispatchJobs(ch):
	flist = listFile("H:\ETM\TIF2")
	for f in flist:
		job = buildJob(f)
		print "Dispatch Job:",f
		SMB_Dispatch.send_job(job)
#SMUP-Parallel,SuperMap Universal Processor Parallel
# File: SMUPP.py
# Author: WangEQ, SuperMap GIS Institute.
# Desc:

import math
from datetime import datetime, date, time
import sys
import SMB_Dispatch
import subprocess


#=================================================================
def Status_test(job):
    tStart = datetime.now()
    for i in range(0, 1000):
        #print "[",datetime.now(),"]", "TEST sendStatus:", i
        SMB_Dispatch.sendStatus("Dispatch_test sendStatus: %s" % i)
    tEnd = datetime.now()

    strTestInfo = "TEST Time:%s [%s]--[%s]" % (i, tStart, tEnd)
    print strTestInfo

    SMB_Dispatch.sendStatus(strTestInfo)
    SMB_Dispatch.close()


if __name__ == '__main__':
    SMB_Dispatch.handle_Dispatcher = Status_test
    SMB_Dispatch.Start()