Part of lp.bugs.scripts.checkwatches View In Hierarchy
| Method | __init__ | Initialize a CheckwatchesMaster. |
| Method | updateBugTrackers | Update all the bug trackers that have watches pending. |
| Method | updateBugTracker | Updates the given bug trackers's bug watches. |
| Method | forceUpdateAll | Update all the watches for bug_tracker_name. |
| Method | updateBugWatches | Update the given bug watches. |
| Method | importBug | Import a remote bug into Launchpad. |
| Method | _bugTrackerUpdaters | Yields functions that can be used to update each bug tracker. |
| Method | _getExternalBugTrackersAndWatches | Return an ExternalBugTracker instance for bug_tracker. |
| Method | _updateBugTracker | Updates the given bug trackers's bug watches. |
| Method | _getRemoteIdsToCheck | Return the remote bug IDs to check for a set of bug watches. |
Inherited from WorkingBase:
| Method | init | Undocumented |
| Method | initFromParent | Undocumented |
| Method | interaction | Context manager for interaction as the given user. |
| Method | transaction | Context manager to ring-fence database activity. |
| Method | statement_logging | Context manager to start and stop SQL statement logging. |
| Method | warning | Record a warning. |
| Method | error | Record an error. |
| Method | _statement_logging_start | Start logging SQL statements and other database activity. |
| Method | _statement_logging_stop | Stop logging SQL statements. |
| Method | _statement_logging_reset | Reset the SQL statement log, if enabled. |
| Parameters | transaction_manager | A transaction manager on which
begin(), abort() and commit() can be
called. Additionally, it should be safe for different
threads to use its methods to manage their own
transactions (i.e. with thread-local storage). |
| log | An instance of logging.Logger, or something that
provides a similar interface. |
If bug tracker names are specified in bug_tracker_names only those bug trackers will be checked.
A custom scheduler can be passed in. This should inherit from
BaseScheduler. If no scheduler is given, SerialScheduler
will be used, which simply runs the jobs in order.
If there is an error, logs are updated, and the transaction is aborted.
| Parameters | bug_tracker | An IBugTracker or the ID of one, so that this method can be called from a different interaction. |
| Returns | A boolean indicating if the operation was successful. | |
bug_tracker_name.| Parameters | bug_tracker_name | The name of the bug tracker to update. |
| batch_size | The number of bug watches to update in one go. If zero, all bug watches will be updated. |
ExternalBugTracker instance for bug_tracker.Return the remote bug IDs to check for a set of bug watches.
The remote bug tracker is queried to find out which of the
remote bugs in `bug_watches` have changed since they were last
checked. Those which haven't changed are excluded.
:param bug_watches: A set of `BugWatch`es to be checked.
:param remotesystem: The `ExternalBugtracker` on which
`getModifiedRemoteBugs`() should be called
:param server_time: The time according to the remote server.
This may be None when the server doesn't specify a remote time.
:param now: The current time (used for testing)
:return: A list of remote bug IDs to be updated.
| Parameters | external_bugtracker | An ISupportsBugImport, which talks to the external bug tracker. |
| bugtracker | An IBugTracker, to which the created bug watch will be linked. | |
| bug_target | An IBugTarget, to which the created bug will be linked. | |
| remote_bug | The remote bug id as a string. | |
| Returns | The created Launchpad bug. | |