AWS Thinkbox Discussion Forums

Storing sub-documents on a job?

I’m wondering if there are any potential pitfalls to storing a custom BSON document inside a job’s PlugInfo that wasn’t submitted with it. My hope would be that Deadline would just basically ignore any data under PlugInfo unless it were asked for, but I just wanted to see if there are any ways you can think of that this could cause problems.

Thanks

All data in PluginInfo would be returned with the job whenever that job is loaded from the database. Since the PluginInfo dictionary only contains strings (for the keys and values), if you store your document as one long string value, that might work just fine.

That’s exactly what I’d like to avoid :smiley:. Any idea how badly things would go if I stored an actual document?

I’d imagine things would go pretty bad if you tried to store a value in PluginInfo that wasn’t a string. :slight_smile:

OK, what about storing a custom sub-doc in the top level of the job doc? The top-level keys in there seem to mainly point to data that’s manipulated in-place, rather than being read and written back all at once.

In theory, that could work. We only save the entire job document when it is initially saved to the database, so you should be safe here.

The only caveat I can think of is if you delete and then undelete the job, or archive and then unarchive the job. In both cases, I think that sub document would get lost.

Cheers,
Ryan

Cool, thanks Ryan.

Privacy | Site terms | Cookie preferences