Uploaded image for project: 'Data Management'
  1. Data Management
  2. DM-26447

ScriptQueueCommander: support setting logLevel, etc. in the add command

    XMLWordPrintable

    Details

    • Story Points:
      1
    • Sprint:
      TSSW Sprint - Aug 17 - Aug 31
    • Team:
      Telescope and Site
    • Urgent?:
      No

      Description

      Enhance the ScriptQueue commander to allow the user to specify logLevel and other options for the add command. Preferably make these optional arguments that use keywords, e.g. logLevel=40.

        Attachments

          Activity

          Hide
          rowen Russell Owen added a comment - - edited

          The queue commander already supported specifying config on the command line – either from a file or as a set of key=value pairs. So that meant adding key=value to support optional parameters wasn't going to work. What I chose to do is add -key=value for the optional fields, with sensible options for each field. For example "-logLevel=40 -location=0". I did not try to get parse enum names, but the help does print the allowed values for location and the usual values for logLevel.

          Also I added a new log level option for starting the script queue commander, which sets the default log level for added scripts.

          It is enough code that I am a bit worried about the lack of unit tests. But I have not yet figured out how to unit test these controllers.

          Pull request: https://github.com/lsst-ts/ts_scriptqueue/pull/52

          Show
          rowen Russell Owen added a comment - - edited The queue commander already supported specifying config on the command line – either from a file or as a set of key=value pairs. So that meant adding key=value to support optional parameters wasn't going to work. What I chose to do is add -key=value for the optional fields, with sensible options for each field. For example "-logLevel=40 -location=0". I did not try to get parse enum names, but the help does print the allowed values for location and the usual values for logLevel. Also I added a new log level option for starting the script queue commander, which sets the default log level for added scripts. It is enough code that I am a bit worried about the lack of unit tests. But I have not yet figured out how to unit test these controllers. Pull request: https://github.com/lsst-ts/ts_scriptqueue/pull/52
          Hide
          rowen Russell Owen added a comment -

          Reviewed on github.

          Show
          rowen Russell Owen added a comment - Reviewed on github.

            People

            Assignee:
            rowen Russell Owen
            Reporter:
            rowen Russell Owen
            Reviewers:
            Tiago Ribeiro
            Watchers:
            Michael Reuter, Russell Owen, Tiago Ribeiro
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:

                Jenkins

                No builds found.