Query work flows

11 views
Skip to first unread message

ling...@gmail.com

unread,
Jul 8, 2016, 3:10:32 PM7/8/16
to fireworkflows
How can I get the list of work flows in latest half an hour or an hour?

thanks,

Ling

Anubhav Jain

unread,
Jul 8, 2016, 5:08:00 PM7/8/16
to ling...@gmail.com, fireworkflows
You can use the get_wflows and query on the updated_on key. There is also an --rsort option that sorts workflows by updated on. See "lpad get_wflows -h" for more details. There is also "lpad report" - type "lpad report -h" for usage instructions



--
You received this message because you are subscribed to the Google Groups "fireworkflows" group.
To unsubscribe from this group and stop receiving emails from it, send an email to fireworkflow...@googlegroups.com.
To post to this group, send email to firewo...@googlegroups.com.
Visit this group at https://groups.google.com/group/fireworkflows.
To view this discussion on the web visit https://groups.google.com/d/msgid/fireworkflows/01f15d72-6ee4-45cd-97ba-cab4e9c093aa%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

ling...@gmail.com

unread,
Jul 8, 2016, 6:02:25 PM7/8/16
to fireworkflows, ling...@gmail.com
Ajain,

I have two problems with query on created_on:

1. I know I have a WF like this:
    {
        "name": "Physical Annotation Data Preparation: Assembly 706 - GR2HT.SP07.P5.G03--24",
        "state": "FIZZLED",
        "states_list": "W-W-F-C",
        "created_on": "2016-06-19 15:47:16"
    }

But when I query like this:
lpad get_wflows -q '{"created_on": "2016-06-19 15:47:16"}'

I got this: [], nothing coming back.

2. Isn't the query by created_on is only for a specific datetime point not for a datetime range? If I would like to search the WFs within a datatime range, how could I do that?

thanks,

Ling

Anubhav Jain

unread,
Jul 8, 2016, 7:17:07 PM7/8/16
to ling...@gmail.com, fireworkflows
Hi Ling,

The updated_on is stored as a datetime object in MongoDB. That is why a string query does not work. It is straightforward to query on datetime and datetime *ranges* in Python using pymongo (just Google around), but I don't think this will work using the "lpad" command since that doesn't let one specify datetime objects. Unfortunately, for now I would say it is a limitation, although someone would be able to fix it by changing the interpretation of queries on the updated_on / created_on / etc. keys in lpad to be converted to datetime objects instead of str

Reply all
Reply to author
Forward
0 new messages