swh_scheduler_celery_app = <Celery celery.tests at 0x7fd39d996518>
swh_scheduler_celery_worker = <Worker: gen449@bb0ad243701f (running)>
swh_scheduler = <swh.scheduler.backend.SchedulerBackend object at 0x7fd39d3a50b8>
def test_run_ready_task_standard(
swh_scheduler_celery_app, swh_scheduler_celery_worker, swh_scheduler
):
"""Ensure scheduler runner schedules tasks ready for scheduling"""
task_type_name, backend_name = "swh-test-add", TASK_ADD
task_type = swh_scheduler.get_task_type(task_type_name)
assert task_type
assert task_type["backend_name"] == backend_name
task_inputs = [
("oneshot", (12, 30)),
("oneshot", (20, 10)),
("recurring", (30, 10)),
]
tasks = swh_scheduler.create_tasks(
create_task_dict(task_type_name, policy, *args)
> for (policy, args) in task_inputs
)
.tox/py3/lib/python3.7/site-packages/swh/scheduler/tests/test_celery_tasks.py:127:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
.tox/py3/lib/python3.7/site-packages/swh/core/db/common.py:62: in _meth
return meth(self, *args, db=db, cur=cur, **kwargs)
.tox/py3/lib/python3.7/site-packages/swh/scheduler/backend.py:506: in create_tasks
cur.execute("select swh_scheduler_mktemp_task()")
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <cursor object at 0x7fd39d29fb48; closed: -1>
query = 'select swh_scheduler_mktemp_task()', vars = None
def execute(self, query, vars=None):
self.column_mapping = []
self._query_executed = True
> return super().execute(query, vars)
E psycopg2.errors.UndefinedFunction: function swh_scheduler_mktemp_task() does not exist
E LINE 1: select swh_scheduler_mktemp_task()
E ^
E HINT: No function matches the given name and argument types. You might need to add explicit type casts.
.tox/py3/lib/python3.7/site-packages/psycopg2/extras.py:236: UndefinedFunction
TEST RESULT
TEST RESULT
- Run At
- Jun 23 2021, 6:13 PM