#6905 better code snapshot status UX

v1.1.0
closed
nobody
General
2015-08-20
2013-11-20
No

The current snapshot behavior doesn't really tell the user what's going on. After you request a snapshot, it says its looking for one and then just waits for a while until either the snapshot is ready or it suggests that you re-submit. The system should be able to check to see if there is a background task running or not. If it is actively running, we should say that. And not prompt to re-submit.

Make sure any monq_task queries will be efficient, by using existing indexes. Constructing an ObjectId from timestamp and querying on _id to just look for recent tasks may be helpful.

Discussion

  • Dave Brondsema

    Dave Brondsema - 2013-12-03
    • Labels: ux --> 42cc, ux
    • Status: open --> in-progress
     
  • Comment has been marked as spam. 
    Undo

    You can see all pending comments posted by this user  here

    Anonymous - 2014-01-03

    Originally by: kharechko

    I am new to allura. Will next request be efficient enought?

     MonQTask.query.find({'task_name': 'allura.tasks.repo_tasks.tarball', '$or': [{'kwargs': {u'path': u'', u'revision': u'790b7439e8c598ae1029a817c93cd5406584a746'}}, {'args':['790b7439e8c598ae1029a817c93cd5406584a746', '']}]}).sort([('time_queue', pymongo.DESCENDING),]).limit(1).first()
    

    It don't use objectid timestamp, but simplify code.

     
  • Dave Brondsema

    Dave Brondsema - 2014-01-03

    If you can add 'status' to that query, then it would be. But without it, it will not use any index:

    > db.monq_task.find({'task_name': 'allura.tasks.repo_tasks.tarball', '$or': [{'kwargs': {'path': '', 'revision': '790b7439e8c598ae1029a817c93cd5406584a746'}}, {'args':['790b7439e8c598ae1029a817c93cd5406584a746', '']}]}).explain()
    {
        "cursor" : "BasicCursor",
             ...
        "nscanned" : 42350,
             ...
    
    > db.monq_task.find({'state': 'busy', 'task_name': 'allura.tasks.repo_tasks.tarball', '$or': [{'kwargs': {'path': '', 'revision': '790b7439e8c598ae1029a817c93cd5406584a746'}}, {'args':['790b7439e8c598ae1029a817c93cd5406584a746', '']}]}).explain()
    {
        "cursor" : "BtreeCursor state_1_task_name_1_time_queue_1",
            ...
        "nscanned" : 0,
            ...
    

    BasicCursor means no index is used, BtreeCursor means an index is being used. See http://docs.mongodb.org/manual/core/index-compound/ for more info on mongo indexes (including the Prefixes section at bottom). To see what indexes are specified for a model/collection, look at the indexes var within the __mongometa__ section of our python class. And there is always an index on _id

     
  • Igor Bondarenko

    Igor Bondarenko - 2014-01-08
    • status: in-progress --> code-review
     
  • Igor Bondarenko

    Igor Bondarenko - 2014-01-08

    Closed #503. je/42cc_6905

     
  • Tim Van Steenburgh

    • QA: Tim Van Steenburgh
    • Milestone: forge-backlog --> forge-jan-10
     
  • Tim Van Steenburgh

    • status: code-review --> closed
    • Size: --> 2
     
  • Tim Van Steenburgh

    Hey Mykola,

    I did quite a bit of refactoring on this in branch tv/6905 before merging to master. Just letting you know so you can take a look at what I changed if you'd like.

     

Log in to post a comment.