Exemplo n.º 1
0
 def test_SkyQuery_cancelJob(self):
     isCanceled = SkyQuery.cancelJob(
         SkyQuery.submitJob(query=SkyQuery_Query, queue="long"))
     self.assertEqual(isCanceled, True)
Exemplo n.º 2
0
 def test_SkyQuery_waitForJob(self):
     jobId = SkyQuery.submitJob(query=SkyQuery_Query, queue="quick")
     jobDescription = SkyQuery.waitForJob(jobId=jobId, verbose=True)
     self.assertEqual(jobDescription["status"], "completed")
Exemplo n.º 3
0
 def test_SkyQuery_submitJob(self):
     jobId = SkyQuery.submitJob(query=SkyQuery_Query, queue="quick")
     self.assertNotEqual(jobId, "")
Exemplo n.º 4
0
 def test_SkyQuery_getJobStatus(self):
     jobId = SkyQuery.submitJob(query=SkyQuery_Query, queue="quick")
     jobDescription = SkyQuery.getJobStatus(jobId=jobId)
print(quick)
print(long)


# In[ ]:

#Define query

SkyQuery_Query = "select 4.5 as Column1, 5.5 as Column2"


# In[ ]:

#submit a query as a job

jobId = SkyQuery.submitJob(query=SkyQuery_Query, queue="quick")
print(jobId)


# In[ ]:

#get status of a submitted job

jobId = SkyQuery.submitJob(query=SkyQuery_Query, queue="quick")
jobDescription = SkyQuery.getJobStatus(jobId=jobId)
print(jobDescription)


# In[ ]:

# wait for a job to be finished and then get the status