Copyright (C) 2012-2020 Rudolf Cardinal (firstname.lastname@example.org).
This file is part of CamCOPS.
CamCOPS is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
CamCOPS is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with CamCOPS. If not, see <https://www.gnu.org/licenses/>.
SQLAlchemy ORM class representing an export recipient.
This has a close relationship with (and inherits from)
Full details of parameters are in the docs for the config file.
Creates a blank
NB not called when SQLAlchemy objects loaded from database; see
Returns the database URL (if present), but with its password obscured.
get_attrnames() → List[str]¶
Returns all relevant attribute names.
get_existing_matching_recipient(dbsession: sqlalchemy.orm.session.Session, recipient: camcops_server.cc_modules.cc_exportrecipient.ExportRecipient) → Optional[camcops_server.cc_modules.cc_exportrecipient.ExportRecipient]¶
Retrieves an active instance from the database that matches
other, if there is one.
init_on_load() → None¶
Called when SQLAlchemy recreates an object; see https://docs.sqlalchemy.org/en/latest/orm/constructors.html.
is_task_suitable(task: Task) → bool¶
Used as a double-check that a task remains suitable.
is the task suitable for this recipient?
- Return type
is_upload_suitable_for_push(tablename: str, uploading_group_id: int) → bool¶
Might an upload potentially give tasks to be “pushed”?
tablename – table name being uploaded
uploading_group_id – group ID if the uploading user
whether this upload should be considered further