-
Notifications
You must be signed in to change notification settings - Fork 106
Updater 1.2
To enable people to write their own update scripts instead of relying on the sequential built in web and system cron, API routes and console commands have been created.
Updating should be done in the following fashion:
- Run the cleanup before the update
- Get all feeds and user ids
- For each feed and user id, run the update command
- Run the cleanup after the update.
This implementation in Python should give you a good idea how to design and run it.
This is used to clean up the database. It deletes folders and feeds that are marked for deletion
- Status: Implemented in 1.601
- Authentication: Requires admin user
- Method: GET
- Route: /cleanup/before-update
- Returns: Nothing
New in 8.1.0: The console command for achieving the same result is:
php -f owncloud/occ news:updater:before-update
- Status: Implemented in 1.203
- Authentication: Requires admin user
- Method: GET
- Route: /feeds/all
- Parameters: none
- Returns:
{
"feeds": [
{
"id": 39,
"userId": "john",
}, // etc
]
}
New in 8.1.0: The console command for achieving the same result is:
php -f owncloud/occ news:updater:all-feeds
- Status: Implemented in 1.601
- Authentication: Requires admin user
- Method: GET
- Route: /feeds/update
- Parameters:
{
"userId": "john",
"feedId": 3
}
- Return codes:
- HTTP 404: If the feed does not exist
- Returns: Nothing
New in 8.1.0: The console command for achieving the same result is:
php -f owncloud/occ news:updater:update-feed 3 john
This is used to clean up the database. It removes old read articles which are not starred
- Status: Implemented in 1.601
- Authentication: Requires admin user
- Method: GET
- Route: /cleanup/after-update
- Returns: Nothing
New in 8.1.0: The console command for achieving the same result is:
php -f owncloud/occ news:updater:after-update