mirror of
https://github.com/lucaspalomodevelop/indico-plugins.git
synced 2026-03-13 07:29:39 +00:00
Remove create_agent CLI
This commit is contained in:
parent
6ce5d7e223
commit
20ed8b65b9
@ -101,25 +101,6 @@ def initial_export(agent_id, force=False):
|
||||
db.session.commit()
|
||||
|
||||
|
||||
@cli_manager.command
|
||||
def create_agent(agent_type, name=None):
|
||||
"""Creates a new agent"""
|
||||
update_session_options(db)
|
||||
try:
|
||||
agent_class = current_plugin.agent_classes[agent_type]
|
||||
except KeyError:
|
||||
print 'No such agent type'
|
||||
return
|
||||
# TODO: Prompt for agent type specific settings
|
||||
agent = LiveSyncAgent(backend_name=agent_type, name=name or agent_class.title)
|
||||
db.session.add(agent)
|
||||
db.session.commit()
|
||||
print agent
|
||||
|
||||
|
||||
# TODO: delete_agent, update_agent
|
||||
|
||||
|
||||
@cli_manager.command
|
||||
def run(agent_id=None):
|
||||
"""Runs the livesync agent"""
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user