Changeset 8392b7 in indico


Ignore:
Timestamp:
01/26/11 18:37:45 (2 years ago)
Author:
Pedro Ferreira <jose.pedro.ferreira@…>
Branches:
master, burotel, hello-world-walkthrough, ipv6, v0.98-series, v0.98.2, v0.98.3, v0.98b1, v0.98b2, v0.99, 051b2622c51afb171a1dedb46a0df4fbb0cbd02e, d9941f8582b36b24821a11ea5ba16fda6a457fb1
Children:
e952fe
Parents:
b8c483
git-author:
Pedro Ferreira <jose.pedro.ferreira@…> (01/12/11 17:05:59)
git-committer:
Pedro Ferreira <jose.pedro.ferreira@…> (01/26/11 18:37:45)
Message:

[IMP] Scheduler tasks can be run from cli

  • Only ID has to be provided
File:
1 edited

Legend:

Unmodified
Added
Removed
  • indico/modules/scheduler/daemon_script.py

    r597fec r8392b7  
    2727import time, sys, os, argparse, logging, cmd, multiprocessing 
    2828 
    29 from indico.modules.scheduler import Scheduler, Client, base 
     29from indico.modules.scheduler import Scheduler, SchedulerModule, Client, base 
    3030 
    3131# legacy import 
     
    188188 
    189189def _run(args): 
    190  
    191190    _setup(args) 
    192191 
     
    214213    parser_show = subparsers.add_parser('show', help="show information") 
    215214    parser_cmd = subparsers.add_parser('cmd', help="execute a command") 
     215    parser_run = subparsers.add_parser('run', help="run a task, from this process") 
    216216 
    217217    parser.add_argument("-p", "--fork-processes", dest="mode", 
     
    254254    parser_cmd.set_defaults(func = _cmd) 
    255255 
     256    parser_run.add_argument("taskid", 
     257                        type=int, 
     258                        help = "task to be executed (id)") 
     259    parser_run.set_defaults(func = _run) 
     260 
     261 
    256262    args = parser.parse_args() 
    257263 
Note: See TracChangeset for help on using the changeset viewer.