コード例 #1
0
def loadJobs():
    global jobs
    jobs = jobs_handler.loadJobs()
コード例 #2
0
ファイル: paperboy.py プロジェクト: chess-seventh/paperboy
import jobs_handler
import time
import jobs_executor
import executiontime_calculator
from datetime import datetime


def printJobs(jobs):
    for job in jobs:
        print "\t Job: %s" % job.recipeRef


jobs = jobs_handler.loadJobs()
print "Welcome to the paperboy server"

jobsLen = len(jobs)
if jobsLen == 0:
    print "Currently we have no job to run"
elif jobsLen == 1:
    print "Currently we have one job to run:"
else:
    print "Currently we have %d jobs to run:" % jobsLen

print "Calculating execution times:"
for job in jobs:
    executiontime_calculator.calculateNextExecution(job)
    print "%s : %s" % (job.recipeRef, job.nextExecution)

while True:
    now = datetime.now()
    for job in jobs:
コード例 #3
0
ファイル: paperboy.py プロジェクト: savass/paperboy
#!/usr/bin/python
import jobs_handler
import time
import jobs_executor
import executiontime_calculator
from datetime import datetime


def printJobs(jobs):
    for job in jobs:
        print "\t Job: %s" % job.recipeRef


jobs = jobs_handler.loadJobs()
print "Welcome to the paperboy server"


jobsLen = len(jobs)
if jobsLen == 0:
    print "Currently we have no job to run"
elif jobsLen == 1:
    print "Currently we have one job to run:"
else:
    print "Currently we have %d jobs to run:" % jobsLen

print "Calculating execution times:"
for job in jobs:
    executiontime_calculator.calculateNextExecution(job)
    print "%s : %s" % (job.recipeRef, job.nextExecution)

while True: