Skip to content
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

add sticky services, auto-restart services, fix foreground option #643

Merged
merged 1 commit into from
Feb 16, 2016

Conversation

kived
Copy link
Contributor

@kived kived commented Feb 15, 2016

Allows services to be started sticky (sticky option with --service, i.e. --service=name:file.py:sticky).

Adds option to restart services when they exit by calling <ServiceObject>.setAutoRestartService(true). When the Python interpreter exits, it will be restarted automatically. This is done programmatically, rather than via a build option, so that a service can actually shut down if necessary (by setting auto-restart to false).

Fixes issue with the foreground option which caused it to be applied to all services, regardless of whether the option was actually specified.

inclement added a commit that referenced this pull request Feb 16, 2016
add sticky services, auto-restart services, fix foreground option
@inclement inclement merged commit 9273780 into kivy:master Feb 16, 2016
@inclement
Copy link
Member

Neato

AndreMiras added a commit to AndreMiras/python-for-android that referenced this pull request Sep 15, 2018
1) Fixes services auto-restart introduced in kivy#643:
`onTaskRemoved()` stops the service gracefully using `stopSelf()` when
it get killed. That way `onDestroy()` gets triggered and service will
restart under different process if auto-restart is enabled.

2) Documents process behavior and auto-restart usage:
Emphasis that services are running in a dedicated processes, different
from the app process, which is not the Android default behavior.
Adds a code snippet.
AndreMiras added a commit to AndreMiras/python-for-android that referenced this pull request Sep 15, 2018
1) Fixes services auto-restart introduced in kivy#643:
`onTaskRemoved()` stops the service gracefully using `stopSelf()` when
it get killed. That way `onDestroy()` gets triggered and service will
restart under different process if auto-restart is enabled.

2) Documents process behavior and auto-restart usage:
Emphasis that services are running in a dedicated processes, different
from the app process, which is not the Android default behavior.
Adds a code snippet.
AndreMiras added a commit to AndreMiras/python-for-android that referenced this pull request Sep 15, 2018
1) Fixes services auto-restart introduced in kivy#643:
`onTaskRemoved()` stops the service gracefully using `stopSelf()` when
it gets killed. That way `onDestroy()` gets triggered and service will
restart under different process if auto-restart is enabled.

2) Documents process behavior and auto-restart usage:
Emphasis that services are running in a dedicated processes, different
from the app process, which is not the Android default behavior.
Adds a code snippet.
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.

2 participants