def main(): ds = Datastore() print('immediate packages') ds.get_imm_packages() ds.get_seen_info() ds.get_decision_info() ds.save()
def __init__(self, handle): activity.Activity.__init__(self, handle) logger.debug("test") # Configure the toolbox toolbox = activity.ActivityToolbox(self) activity_toolbar = toolbox.get_activity_toolbar() activity_toolbar.keep.props.visible = False activity_toolbar.share.props.visible = False self.set_toolbox(toolbox) toolbox.show() # Create a data store and the app datastore = Datastore("127.0.0.1:8080") backend = BackEnd(datastore, self.get_activity_root()) main = SortingPanel(datastore, backend) widget = main.get_widget() # pack self.set_canvas(widget) widget.grab_focus() widget.modify_font(pango.FontDescription("sans %d" % style.zoom(10)))
''' Created on Mar 7, 2011 @author: cgueret ''' from Backend import BackEnd from Datastore import Datastore import os if __name__ == '__main__': # Create a data store datastore = Datastore("127.0.0.1:8080") backend = BackEnd(datastore, ".") for file in os.listdir('items'): print 'Add %s' % file backend.add_item('items/%s' % file) #backend.add_item("chair.jpg")
'Forbidden' (403) error message. The message did not show up on Windows. Also on Solaris 5.10 the separate components worked fine, only combination seems to fail. PROBLEM SOLVED - The error occurs when the Proxy server is set. Check on Public Cognos needs to be done on internal network. So execute this script before setting the proxy server. """ from Datastore import Datastore from PublicCognos import PublicCognos from lib import my_env # Initialize Environment projectname = "mowdr" modulename = my_env.get_modulename(__file__) config = my_env.get_inifile(projectname, __file__) my_log = my_env.init_loghandler(config, modulename) my_log.info('Start Application') ds = Datastore(config) for indic_id in ds.get_indicator_ids(): if not ds.check_resource(indic_id, "cognos"): indicatorname = ds.get_indicator_value(indic_id, "title")[0][0] # Verify if Cognos URL exist on PublicCognos. Load if it does. pc_url = PublicCognos(indicatorname) # Get my PublicCognos URL Object # Check if Cognos Public URL exists if pc_url.check_if_cognos_report_exists(): # get redirect_file and redirect_page. redirect_file, redirect_url = pc_url.redirect2cognos_page( indic_id, config) # Add Cognos URL to indicators table. Cognos Resource ID (id_cognos) is not available as long as package # has not been created. ds.insert_indicator(indic_id, 'url_cognos', redirect_url) my_log.info("End Application")
print('starting') debug = os.environ['IS_DEBUG'] == 'true' dryRun = False #os.environ['DRY_RUN'] == 'true' messageHost = 'localhost' if debug else os.environ['RABBIT_ADDR'] print('messageHost: %s' % messageHost) connection = pika.BlockingConnection( pika.ConnectionParameters(host=messageHost, heartbeat=20)) channel = connection.channel() channel.queue_declare(queue='frame_jobs', durable=True) datastore = Datastore() imageParser = ImageParser() print("openface ready") if dryRun: print("Dry run enabled") # print(" [x] Sent 'Hello World!'") def onFrameJob(ch, method, properties, body): msg = json.loads(body) videoId = msg['videoId']
def __init__(self, config): self.config = config self.ds = Datastore(config) self.ckan = CKANConnector(self.config, self.ds) self.ftp = Ftp_Handler(self.config)