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

Modernize the way tasks are run in scriptqueue

    XMLWordPrintable

    Details

    • Story Points:
      1
    • Sprint:
      TSSW Sprint - Sep 16 - Sep 28
    • Team:
      Telescope and Site

      Description

      Modernize the following:

      • Use asyncio.run instead of asyncio.get_event_loop().run_until_complete
      • Use asyncio.create_task instead of asyncio.ensure_future where it is safe to do so.
      • Make sure there is an event loop before any domain, remote or CSC
      • Use ScriptQueue.amain to run the ScriptQueue instead of making a separate parser
      • Run scripts using amain instead of main
      • Update unit tests to use asynctest

        Attachments

          Activity

          Hide
          rowen Russell Owen added a comment - - edited

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

          I had to revert using asyncio.create_task instead of asyncio.ensure_future in library code in ts_salobj in order for the request script ui code to run. Otherwise it fails with "no running event loop" because request_script.py has no running even loop most of the time. Eventually I'd like to fix that if we can figure out how.

          Show
          rowen Russell Owen added a comment - - edited Pull request: https://github.com/lsst-ts/ts_scriptqueue/pull/37 I had to revert using asyncio.create_task instead of asyncio.ensure_future in library code in ts_salobj in order for the request script ui code to run. Otherwise it fails with "no running event loop" because request_script.py has no running even loop most of the time. Eventually I'd like to fix that if we can figure out how.
          Hide
          tribeiro Tiago Ribeiro added a comment -

          Reviewed code in GitHub. 

          Show
          tribeiro Tiago Ribeiro added a comment - Reviewed code in GitHub. 
          Hide
          rowen Russell Owen added a comment -

          I noted the required version of ts_idl in the revision history, as requested, created temporary tags on ts_sal, ts_idl and ts_salobj so the tests could run, then merged to develop. I tagged the result as v2.4.0_RC2

          Show
          rowen Russell Owen added a comment - I noted the required version of ts_idl in the revision history, as requested, created temporary tags on ts_sal, ts_idl and ts_salobj so the tests could run, then merged to develop. I tagged the result as v2.4.0_RC2

            People

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

              Dates

              Created:
              Updated:
              Resolved:

                Jenkins

                No builds found.