I'm a coder. Welcome to my blog. Here are some of the records on my job.

Categories

CherryPy with additional threads for custom tasks

advertisements

We're designing a system based on CherryPy that in addition to serving web requests needs to do tasks/jobs in parallel. We want it to be a single process running as a daemon and create threads for all the parallel jobs like scheduled tasks or collecting data online.

I've been browsing through the CherryPy documentation and know that it's thread-pooled creating threads for all user requests. However I can't seem to find documentation on how to create and manage threads for custom jobs. Does CherryPy have a thread-handler that we can hook in to or could/should we write our own handler that hooks into CherryPy?

Related Articles

I have the following problem. Right now I am building a classifier system which will use text and some additional complimentary information as an input. I store complimentary information in pandas DataFrame. I transform text using CountVectorizer and

I have a listview which loads its data from sqlite database. Each row in listview has image , textview and a checkbox. The sqlitedatabase rows has image and text data + some other columns. My question is can I bind my listview with the database so th

I've got an HTML file with following content: <html> <body> <span>{{ secret }}</span> </body> </html> I'm looking for a grunt task that could take this source file, take a map of values: grunt.initConfig({ myTask: { myT

I want to use libev with multiple threads for the handling of tcp connections. What I want to is: The main thread listen on incoming connections, accept the connections and forward the connection to a workerthread. I have a pool of workerthreads. The

I want to do some unusual in Django orm. I have the model Car. How can I extend it with additional information, separated by type, storing in another model? For example, for entry of Car "My Truck", which type is truck, i want to extend it with

I'm trying to create a thread which runs a set of tasks and, if it does not finish within a specific time (say 100 seconds), throws an exception. Currently I am trying to do this by encapsulating the tasks into a runnable object and using ExecutorSer

Earlier I asked about processing a datastream and someone suggested to put data in a queue and processing this data on a different thead. If this was to slow, I should use multiple threads. However, i'm using a system that has one core. So my questio

I am creating a monitor application that can monitor 100-150 devices...Now to design a monitor application, I have two approaches:- Create a thread for each of the device to monitor and each thread will ping (Using ICMP) to device to know whether the

let say i have a for loop of 1000 and it do some stuff. I can inside a pause function with a button 'pause' and unpause with a button 'resume'. Question do i need to implement a thread for such a case? for (int i = 0; i < 1000; i++) { // Do stuff pau

I wrote a MsBuild Task : MyTask. In my solution, I have the Task project and others projects. MyTask references a project (say ProjA) which references third assemblies, say (dep1 and dep2). The projects all builds well and I have the outputs in one d

I am building a custom SSIS task. In the task, I run some scripts. These are located in the project/ in a subfolder scripts/. Now the problem is when I debug my task from BIDS: Directory.GetCurrentDirectory(); returns: C:\Program Files (x86)\Microsof

What language I should start study for these tasks: working with p2p web service working with webcams video capture video streaming(web etc.) same with audio(recording,streaming) Thanks ;)i would say C# and python i saw most of this work done in C# c

I have flex mxml custom component(Graphic).According to requirement a need to copy them as copy or cut operation.but problem in the registerClassAlias() method,how it will work for custom graphic or Group(or UIComponents) components. var className:St

In the footer of the phpmyadmin homepage is a warning that reads, "The additional features for working with linked tables have been deactivated. To find out why click here." You should set up the phpMyAdmin configuration storage to benefit from