Skip to content

Sample data and ingestion script for waitlist module.

Notifications You must be signed in to change notification settings

minrva/db-waitlist

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 

Repository files navigation

db-waitlist

Copyright (C) 2017 The Open Library Foundation

This software is distributed under the terms of the Apache License, Version 2.0. See the file "LICENSE" for more information.

Introduction

This contains init_mod_waitlist.py which can be used to populate mod-waitlist datatables with sample waitlist reserves data.

Pre-Requisite: Mod-Waitlist Postgres Schema

In order for init_mod_waitlist.py to work properly, the datatables for mod-waitlist must be generated for the diku tenant. The datatables can be autogenerated by enabling mod-waitlist for the diku tenant through the Okapi gateway.

Further Explanation

Datatables for mod-waitlist are autogenerated when mod-waitlist is enabled for a given user (e.g. diku) through the following process:

  1. An HTTP POST request to enable mod-waitlist for diku is sent to the Okapi gateway.
  2. The Okapi gateway calls the /_/tenant endpoint of mod-waitlist.
  3. The /_/tenant endpoint uses a template to autogenerate the postgres, tenant-specific schema for mod-waitlist.

Ingesting Mod-Waitlist Sample Data

Ingesting mod-waitlist sample data involves:

  1. Running and enabling mod-waitlist through Okapi, in order to trigger the creation of the diku_mod_waitlist schema and courses/items/instructors tables.
  2. Running init_mod_waitlist.py which will automatically add uuidv4 ids to the json objects and then insert them into the jsonb column of their corresponding postgres datatables.

About

Sample data and ingestion script for waitlist module.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%