Created_on in the workflows collection in Mongo

11 views
Skip to first unread message

zhouw...@gmail.com

unread,
Jul 14, 2015, 11:39:44 AM7/14/15
to firewo...@googlegroups.com
Dear AJ,

A quick question. I noticed lately that the Created_on time in the workflows collection is updated everytime a firework status is changed. Is this time supposed to be the start time of the workflow and stay static all the time? I am assuming updated_on should be adjusted when the status of any firework changes. If so, is there an easy fix in the code? I would like to use the created_on and updated_on in the workflows database for the pipeline reporting in the dashboard site. Thanks.


Wengang

Anubhav Jain

unread,
Jul 14, 2015, 12:26:49 PM7/14/15
to zhouw...@gmail.com, firewo...@googlegroups.com
Hi Wengang,

You are correct that it is supposed to be static time at which the workflow was created. I don't have a quick answer for you (and haven't confirmed this), but hope to look into it in the next couple of weeks. In the meantime, if you have any thoughts for where the error lies, please let me know.

Best,
Anubhav

--
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 view this discussion on the web visit https://groups.google.com/d/msgid/fireworkflows/25cd53a4-63ea-45c3-9478-5450507153b1%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Anubhav Jain

unread,
Aug 14, 2015, 12:59:24 PM8/14/15
to fireworkflows, zhouw...@gmail.com, AJ...@lbl.gov
Hi Wengang,

I think I have fixed this bug - sorry for the delay! Unfortunately, the "created_on" field for your past workflows won't work, but it should be retained for your new workflows.

The patch is on the latest version of FWS on Github already. I will release it to PyPI pretty soon.

Thanks again for pointing out the bug.

Best,
Anubhav

On Tuesday, July 14, 2015 at 9:26:49 AM UTC-7, Anubhav Jain wrote:
Hi Wengang,

You are correct that it is supposed to be static time at which the workflow was created. I don't have a quick answer for you (and haven't confirmed this), but hope to look into it in the next couple of weeks. In the meantime, if you have any thoughts for where the error lies, please let me know.

Best,
Anubhav
On Tue, Jul 14, 2015 at 8:39 AM, <zhouw...@gmail.com> wrote:
Dear AJ,

A quick question. I noticed lately that the Created_on time in the workflows collection is updated everytime a firework status is changed. Is this time supposed to be the start time of the workflow and stay static all the time? I am assuming updated_on should be adjusted when the status of any firework changes. If so, is there an easy fix in the code? I would like to use the created_on and updated_on in the workflows database for the pipeline reporting in the dashboard site. Thanks.


Wengang

--
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 fireworkflows+unsubscribe@googlegroups.com.

Anubhav Jain

unread,
Aug 21, 2015, 5:15:17 PM8/21/15
to fireworkflows, zhouw...@gmail.com, AJ...@lbl.gov
Hi Wengang,

One more note - it should be possible to "patch" the created_on keys manually if they are very important to your application. The ObjectId of a Mongo document actually embeds a created_on date inside. You can extract the data from the ObjectId (i.e., the "_id" key) and then use that to overwrite your corrupted created_at.

See "Mongo's BSON ID is awesome" here:
Reply all
Reply to author
Forward
0 new messages