def _test_source_log_func(): import logging logging.INFO logging.basicConfig( level=logging.INFO, # filename='./data/filesort.log', # filemode='a', format='%(asctime)s | %(levelname)s | %(message)s') logger = logging.getLogger('test') logger.info('bbbbbbbbbbbbb')
:author: Feei <*****@*****.**> :author: Lightless <*****@*****.**> :homepage: https://github.com/wufeifei/cobra :license: MIT, see LICENSE for more details. :copyright: Copyright (c) 2017 Feei. All rights reserved """ import os import re import subprocess from urllib import quote from utils import config from utils.log import logging logging = logging.getLogger(__name__) class GitError(Exception): def __init__(self, message): Exception.__init__(self) self.message = message def __str__(self): return repr(self.message) class NotExistError(GitError): def __init__(self, message): self.message = message
:license: MIT, see LICENSE for more details. :copyright: Copyright (c) 2017 Feei. All rights reserved """ import time import datetime from sqlalchemy import func from sqlalchemy.schema import UniqueConstraint, Index from sqlalchemy.dialects.mysql import TINYINT, INTEGER, SMALLINT, TEXT from werkzeug.security import check_password_hash, generate_password_hash from app import db from utils.log import logging logging = logging.getLogger(__name__) class CobraTaskInfo(db.Model): """ Tasks for project """ __tablename__ = 'tasks' __table_args__ = ({"mysql_charset": "utf8mb4"}) id = db.Column(INTEGER(unsigned=True), primary_key=True, autoincrement=True, nullable=False) target = db.Column(db.String(255), nullable=False, default=None) branch = db.Column(db.String(64), nullable=False, default=None)