bbc1.core.query_management module¶
Copyright (c) 2017 beyond-blockchain.org.
Licensed under the Apache License, Version 2.0 (the “License”); you may not use this file except in compliance with the License. You may obtain a copy of the License at
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an “AS IS” BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
-
class
bbc1.core.query_management.
QueryEntry
(expire_after=30, callback_expire=None, callback=None, callback_error=None, interval=0, data={}, retry_count=-1)[source]¶ Bases:
object
Callback manager
-
update
(fire_after=None, expire_after=None, callback=None, callback_error=None, init=False)[source]¶ Update the entry information
Parameters: - fire_after (float) – set callback (periodical) to fire after given time (in second)
- expire_after (float) – set expiration timer to given time (in second)
- callback (obj) – callback method that will be called periodically
- callback_error (obj) – callback method that will be called when error happens
- init (bool) – If True, the scheduler is sorted again
-