-
Notifications
You must be signed in to change notification settings - Fork 18
Add context information to gear input files #894
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
@ambrussimon-invenshure I was unable to get the job tests to work with this change. It looks like the default gear from the I tried modifying line 24 of Could you help me get to the point where these tests pass? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall looks good, just needs to fix/add some tests 👍
api/jobs/handlers.py
Outdated
# B) a user editing the file object | ||
# | ||
# You can count on neither occurring before a job starts, because the queue is not globally FIFO. | ||
# So option #2 is potentially more convenient, but unintuitive and prone to customer confusion. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
s/customer/user 🙃
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
if c.get('config') is not None and c.get('inputs') is not None: | ||
# New behavior | ||
encoded = json.dumps(c, sort_keys=True, indent=4, separators=(',', ': ')) + '\n' | ||
self.response.app_iter = StringIO.StringIO(encoded) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If this is used multiple places, could we add it as a named encoder in web/encoder.py
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
Broken tests have been resolved. |
API request handlers for the jobs module | ||
""" | ||
import bson | ||
import json |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lol
This allows you to do something like
python call.py --number $FW_CONFIG_PHONE
if you're not using a scripting language.config.json
file will now carry useful information about the files, their location on disk, their location in the hierarchy (if you want to use the API from a gear), and relevant scientific information recorded in the system. For example: