Add launch to Biller
Change-Id: I7fd589ed4fa91d781c0544ef9f45dab6f847c74a
This commit is contained in:
parent
1f0ba1c79c
commit
cfa6aff01a
@ -13,10 +13,14 @@
|
||||
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
import sys
|
||||
|
||||
from oslo.config import cfg
|
||||
from billingstack.openstack.common import log as logging
|
||||
from billingstack.openstack.common import service as os_service
|
||||
from billingstack.openstack.common.rpc import service as rpc_service
|
||||
from billingstack.storage.utils import get_connection
|
||||
from billingstack import service as bs_service
|
||||
|
||||
|
||||
cfg.CONF.import_opt('biller_topic', 'billingstack.biller.rpcapi')
|
||||
@ -88,3 +92,10 @@ class Service(rpc_service.Service):
|
||||
|
||||
def delete_invoice_line(self, ctxt, id_):
|
||||
return self.storage_conn.delete_invoice_line(ctxt, id_)
|
||||
|
||||
|
||||
def launch():
|
||||
bs_service.prepare_service(sys.argv)
|
||||
launcher = os_service.launch(Service(),
|
||||
cfg.CONF['service:biller'].workers)
|
||||
launcher.wait()
|
||||
|
Loading…
x
Reference in New Issue
Block a user