def sync_plugins_metadata(cls, plugin_ids=None): """Sync metadata for plugins by given ids. If there is not ids all newest plugins will be synced """ if plugin_ids: plugins = PluginCollection.get_by_uids(plugin_ids) else: plugins = PluginCollection.all() for plugin in plugins: plugin_adapter = wrap_plugin(plugin) plugin_adapter.sync_metadata_to_db()
def sync_plugins_metadata(cls, plugin_ids=None): """Sync metadata for plugins by given ids. If there is not ids all newest plugins will be synced """ if plugin_ids: plugins = PluginCollection.get_by_uids(plugin_ids) else: plugins = PluginCollection.all_newest() for plugin in plugins: plugin_wrapper = wrap_plugin(plugin) plugin_wrapper.sync_metadata_to_db()
def sync_plugins_metadata(cls, plugin_ids=None): """Sync or install metadata for plugins by given IDs. If there are no IDs, all plugins will be synced. :param plugin_ids: list of plugin IDs :type plugin_ids: list """ if plugin_ids: for plugin in PluginCollection.get_by_uids(plugin_ids): cls._plugin_update(plugin) else: cls._install_or_update_or_delete_plugins()
def sync_plugins_metadata(cls, plugin_ids=None): """Sync metadata for plugins by given IDs. If there are no IDs, all newest plugins will be synced. :param plugin_ids: list of plugin IDs :type plugin_ids: list """ if plugin_ids: plugins = PluginCollection.get_by_uids(plugin_ids) else: plugins = PluginCollection.all() for plugin in plugins: plugin_adapter = wrap_plugin(plugin) plugin_adapter.sync_metadata_to_db()