Skip to content

Implemented system-tasks #38

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 8 commits into from
Mar 17, 2017
Merged

Implemented system-tasks #38

merged 8 commits into from
Mar 17, 2017

Conversation

wachterjohannes
Copy link
Member

@wachterjohannes wachterjohannes commented Mar 16, 2017

This PR introduces the feature of system tasks. You can now configure predefined tasks in you config tree:

task:
    system_tasks:
        my_task:
            enabled: true
            handler_class: 'AppBundle\Handler\TestHandler'
            workload: 'my workload'
            interval: '@daily'
        ...

Related PR: php-task/php-task#31 php-task/docs#4

TODO

  • docs

@wachterjohannes wachterjohannes changed the base branch from master to develop March 16, 2017 12:40
Copy link
Member

@alexander-schranz alexander-schranz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Upgrade for the database is missing

@alexander-schranz
Copy link
Member

Old system tasks are not removed from executions.

->arrayNode('system_tasks')
->prototype('array')
->children()
->booleanNode('enabled')->defaultTrue()->end()
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wouldn't false be a better default? Or does it still work if the three settings below are not set?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is a prototype which can be extended. when i add a system-task it should be enabled by default. if i want to keep the config but want to disable it you can set the enabled flag.

@danrot
Copy link

danrot commented Mar 17, 2017

If the old tasks continue to work as until now, and no configuration has to be adapted (I already commented a line which is suspicious) I don't see how that should break Sulu.

@wachterjohannes
Copy link
Member Author

@danrot problem is that you have to update the schema of the table

@danrot
Copy link

danrot commented Mar 17, 2017

Looks like you are merging it into develop, so it will only come with the next minor release? Should be fine in my opinion.

@wachterjohannes
Copy link
Member Author

@danrot yes it will go into 1.1.0

@wachterjohannes wachterjohannes force-pushed the feature/system-tasks branch 2 times, most recently from 7940bfe to ac8a772 Compare March 17, 2017 10:45
@alexander-schranz alexander-schranz merged commit 4541089 into develop Mar 17, 2017
@wachterjohannes wachterjohannes deleted the feature/system-tasks branch March 17, 2017 12:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants