Browse Source

WIP Add hearthbeat functionnality

plugins
Zykino 3 years ago
parent
commit
b5004a63ed
2 changed files with 9 additions and 0 deletions
  1. +8
    -0
      prismedia/core.py
  2. +1
    -0
      prismedia/plugins/platforms/peertube.py

+ 8
- 0
prismedia/core.py View File

@ -3,6 +3,7 @@
# NOTE: Since we use config file to set some defaults values, it is not possible to use the standard syntax with brackets, we use parenthesis instead.
# If we were to use them we would overide configuration file values with default values of cli.
# TODO: change `youtube-at` and `peertube-at` that are not easely expendable as options in my opinion
"""
prismedia - tool to upload videos to different platforms (historicaly Peertube and Youtube)
@ -151,13 +152,20 @@ def main():
loadPlugins(basePluginsPath)
manager = PluginManagerSingleton.get()
# TODO: add the arguments’s verification (copy/adapt the Schema table)
options = docopt(__doc__, version=VERSION)
print(options)
# Treat options that do not involve
if options.get('--list-plugins'):
listPlugins()
exit(0)
if options.get('--hearthbeat'):
for plugin in manager.getPluginsOfCategory(pi.PluginTypes.PLATFORM):
plugin.plugin_object.hearthbeat()
exit(0)
print()
print("# Plugins")
#def test_loadPlugins(arg):

+ 1
- 0
prismedia/plugins/platforms/peertube.py View File

@ -421,6 +421,7 @@ class Peertube(pi.IPlatformPlugin):
"""
If needed for your platform, use a bit of the api so the platform is aware the keys are still in use.
"""
print("Hearthbeat for peertube (nothing to do)")
pass

Loading…
Cancel
Save