background-process

iOS Backgrounding & XMPPFramework

℡╲_俬逩灬. 提交于 2019-12-11 09:47:11
问题 So I've created a simple XMPP app, but it appears I can't have background processing unless the app is one of the designated categories listed here. I just want to keep the socket open and display a notification on message received if the app isn't in the foreground. I've found it a little difficult to find out good information on iOS backgrounding, it appears a lot of apps out there manage to do it some how, but the documentation seems a lot more restrictive. Is it possible to run a chat

git post-receive hook not running in background

旧城冷巷雨未停 提交于 2019-12-11 07:59:11
问题 According to the git documentation the post-receive hook essentially blocks the repo until it is completed: ... the client doesn’t disconnect until it has completed, so be careful if you try to do anything that may take a long time. This causes a problem if you need the hook to kick off a build job and then poll for it's completion before kicking off another, say deploy, job. For example, the build server cannot fetch from the repo while said script is running. Let's also assume that you have

Restart android app after cache clear

淺唱寂寞╮ 提交于 2019-12-11 06:47:06
问题 I am using clearApplicationUserData() for clear the app cache after install an update of the android application. Once above method runs, app close immediately. Any suggestion to restart the app after close the app itself? if (Build.VERSION_CODES.KITKAT <= Build.VERSION.SDK_INT) { ((ActivityManager)SplashScreenActivity.this.getSystemService(ACTIVITY_SERVICE)) .clearApplicationUserData(); Toast.makeText(getApplicationContext(), "Cache cleared", Toast.LENGTH_LONG).show(); } 回答1: you can create

iOS: Error Domain=NSCocoaErrorDomain Code=132001 '-save: on the context aborted' using update of the database coredata/push notification in background

喜夏-厌秋 提交于 2019-12-11 06:24:49
问题 When I try to update my DB with coreData with push notification in background by using that command: if (![context save:&error]) { There is an error message Cannot update object that was never inserted . I precise that when I do it with the application active, it works well, but when I use it in background, it doesn't work ( Error Domain=NSCocoaErrorDomain Code=134030 ). - (void)parseAndAddLovAll:(NSMutableArray*)responseArray toArray:(NSMutableArray*)destinationArray { NSError *error; DB

Get exit code of a piped background process

自古美人都是妖i 提交于 2019-12-11 05:01:27
问题 someCommand 2>&1 | grep pattern & How do I get the exit status of someCommand ? PIPESTATUS doesn't work because it's a background process. I've found this link and it seems to work but only if I use it exactly that way. Simple echo ing to the screen doesn't seem to work. I was wondering if it's possible to get the exit code without creating temporary files. 回答1: In bash you could do : echo "${PIPESTATUS[0]} ${PIPESTATUS[1]}" Example : $ ls -l | grep somefile -rw-rw-r-- 1 me me 32 May 4 15:47

tomcat background threads

狂风中的少年 提交于 2019-12-11 03:50:04
问题 I have a tomcat 6.20 instance running, and would like to send an email via a background thread to prevent the email sending function from blocking the request. Is there any way I can execute the thread in the background, while still allowing normal page flow to occur. The application is written in ICEfaces. Thanks. 回答1: Create an Executor using java.util.concurrent.Executors.newCachedThreadPool (or one of the other factory methods) in your controller/servlet's initialization method. When a

Long running tasks in Pyramid web app

China☆狼群 提交于 2019-12-11 02:38:34
问题 I need to run some tasks in background of web app (checking the code out, etc) without blocking the views. The twist in typical Queue / Celery scenario is that I have to ensure that the tasks will complete, surviving even web app crash or restart until those tasks complete, whatever their final result. I was thinking about recording parameters for multiprocessing.Pool in a database and starting all the incomplete tasks at webapp restart. It's doable, but I'm wondering if there's a simpler or

Keep running the iOS app on background, collecting data from accelerator and send it to server

孤者浪人 提交于 2019-12-11 02:19:04
问题 I've developed an app, for reading the Accelerator data, store them locally and send them frequently with a specific interval to a server. The app must work on background, but after a while ( 3 minutes sometime ) it stops sending like it's closed. Is it possible to keep the app alive all the time, running and sending data to a server on background? how ? The app is supposed to keep working for weeks. Thanks guys. 回答1: iOS will allow you 3 minutes of execution in background. https://developer

Android process importance with a started service isn't IMPORTANCE_SERVICE

匆匆过客 提交于 2019-12-11 02:07:31
问题 I'm trying to better understand process priorities in android especially when there is a service running in the same process where activities lives. Android documentation explains that when there is a service started and the application goes in background the process will be a "Service process" with a higher rank in respect of a normal background process. http://developer.android.com/guide/components/processes-and-threads.html Process Lifecycle 3. Service process A process that is running a

worker process in production, queue_classic

自古美人都是妖i 提交于 2019-12-11 00:54:07
问题 I'm using a queue_classic gem in my rails application (https://github.com/ryandotsmith/queue_classic, http://railscasts.com/episodes/344-queue-classic) What is the best way of running a worker process on my vps in production environment? Is a detached screen session a good idea? Should i add cron entry to lunch it on restart in case of a restart? Maybe there is a simpler way of doing it? Thank you for any idea. 来源: https://stackoverflow.com/questions/12516942/worker-process-in-production