Skip to content

Decorator breaks down (metaclass bases cannot create 'NoneType' instances) #7

@rtubio

Description

@rtubio

With the following code:

from datetime import timedelta
import logging
from periodically.decorators import daily
from common import misc
from booking.models import operational, tle

logger = logging.getLogger(__name__)

@daily()
def update_operational_slots():
    logger.info("Populating OperationalSlots table, daily task execution!")
    operational.OperationalSlotsManager.populate_slots(
        start=misc.get_midnight()+timedelta(days=3), duration=timedelta(days=1)
    )

I get the following exception when launching the Django tests:

File "/home/rtubio/repositories/satnet-release-1/WebServices/booking/periodictasks.py", line 31, in <module>
@daily()
File "/home/rtubio/repositories/satnet-release-1/WebServices/__v_env/local/lib/python2.7/site-packages/periodically/decorators.py", line 20, in decorator register.simple_task(fn, schedule, backend=backend)
File "/home/rtubio/repositories/satnet-release-1/WebServices/__v_env/local/lib/python2.7/site-packages/periodically/__init__.py", line 46, in simple_task class DecoratedTask(PeriodicTask):
TypeError: Error when calling the metaclass bases cannot create 'NoneType' instances

Any ideas? Am I doing something wrong?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions