Esempio n. 1
0
def concurrency_test(session):
    list_of_processors = [GetSizeProcessor, GetOwnerProcessor]
    total = 1000
    count = 0
    while count < total:
        count = count + 1
        t = TaskItem('Task ' + str(count), [], TaskManagerWorkSample, \
                     ['/tmp/'], {}, list_of_processors, u'admin')
        tinterval = 1
        t.interval = [IntervalItem(interval=tinterval),]
        session.add(t)
    session.commit()
Esempio n. 2
0
def simple_test(session):
    list_of_processors = [GetSizeProcessor, GetOwnerProcessor]
    t = TaskItem('Sample Work', [], TaskManagerWorkSample, \
                 ['/tmp/'], {}, list_of_processors, u'admin')
    t2 = TaskItem('Sample Work2', [], TaskManagerWorkSample, \
                  ['/home/'], {}, list_of_processors, u'admin')
    t.interval = [IntervalItem(interval=5),]
    t2.calendar = [CalendarItem(dow=[], month=[], day=[], hour=[], \
                                minute=[0,5,10,15,20,25,30,35,40,45,50,55]),]
    session.add(t)
    session.add(t2)
    session.commit()
Esempio n. 3
0
def concurrency_test(session):
    list_of_processors = [GetSizeProcessor, GetOwnerProcessor]
    total = 1000
    count = 0
    while count < total:
        count = count + 1
        t = TaskItem('Task ' + str(count), [], TaskManagerWorkSample, \
                     ['/tmp/'], {}, list_of_processors, u'admin')
        tinterval = 1
        t.interval = [
            IntervalItem(interval=tinterval),
        ]
        session.add(t)
    session.commit()
Esempio n. 4
0
def simple_test(session):
    list_of_processors = [GetSizeProcessor, GetOwnerProcessor]
    t = TaskItem('Sample Work', [], TaskManagerWorkSample, \
                 ['/tmp/'], {}, list_of_processors, u'admin')
    t2 = TaskItem('Sample Work2', [], TaskManagerWorkSample, \
                  ['/home/'], {}, list_of_processors, u'admin')
    t.interval = [
        IntervalItem(interval=5),
    ]
    t2.calendar = [CalendarItem(dow=[], month=[], day=[], hour=[], \
                                minute=[0,5,10,15,20,25,30,35,40,45,50,55]),]
    session.add(t)
    session.add(t2)
    session.commit()