Skip to content
Snippets Groups Projects
Commit 4a32bbd2 authored by Nathaniel Kofalt's avatar Nathaniel Kofalt
Browse files

Quick fix for POST /gears and /rules

parent 198e8e10
No related branches found
No related tags found
No related merge requests found
......@@ -184,6 +184,24 @@ def initialize_db():
db.acquisitions.create_index('session')
db.acquisitions.create_index('uid')
db.acquisitions.create_index('collections')
# Must be kept in sync with jobs/gears.py
db.singletons.update({"_id" : "gears"}, {
'$setOnInsert': {
'gear_list': []
}
},
upsert=True
)
# Must be kept in sync with jobs/rules.py
db.singletons.update({"_id" : "rules"}, {
'$setOnInsert': {
'rule_list': []
}
},
upsert=True
)
create_or_recreate_ttl_index('authtokens', 'timestamp', 604800)
create_or_recreate_ttl_index('uploads', 'timestamp', 60)
create_or_recreate_ttl_index('downloads', 'timestamp', 60)
......
......@@ -16,7 +16,6 @@ from .queue import Queue
log = config.log
class GearsHandler(base.RequestHandler):
"""Provide /gears API routes."""
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment