background-process

Alternative solution to HostingEnvironment.QueueBackgroundWorkItem in .NET Core

徘徊边缘 提交于 2019-11-28 19:35:11
问题 We are working with .NET Core Web Api, and looking for a lightweight solution to log requests with variable intensity into database, but don't want client's to wait for the saving process. Unfortunately there's no HostingEnvironment.QueueBackgroundWorkItem(..) implemented in dnx , and Task.Run(..) is not safe. Is there any elegant solution? 回答1: QueueBackgroundWorkItem is gone, but we've got IApplicationLifetime instead of IRegisteredObject , which is being used by the former one. And it

How does the web version of Whatsapp work on iOS devices considering the OS shuts apps in 30 seconds?

泄露秘密 提交于 2019-11-28 17:26:52
Now for those who don't know, can go to https://web.whatsapp.com/ and sync your Whatsapp chats by exchanging a QR code and chat via the web extension of the app. I am not interested in how they have an initial handshake( might be communicating with whatsapp servers) nor how they sync data so fast for chatting (might be using Open sockets directly from device to client). I am curious as to how the app works in Background on iOS . AFAIK running a background Intent Service is pretty simple. But not for iOS. iOS allows only up to 30 seconds after the app is shut down normally. 1) I tried crashing

Why does git keep telling me it's “Auto packing the repository in background for optimum performance”?

蹲街弑〆低调 提交于 2019-11-28 15:54:19
问题 Note : I don't think this is a duplicate of this question, which is talking about a non-background pack which hangs git with a subtly different error message . In one of my git repositories, each time I invoke (for example) git fetch , git prints: Auto packing the repository in background for optimum performance. See "git help gc" for manual housekeeping. It appears to print this every time if I do a git fetch repeatedly, even when there are no changes and nothing for git fetch to do. This

Message Queues in Ruby on Rails

感情迁移 提交于 2019-11-28 15:30:56
问题 What message queues are people using for their Rails apps and what was the driving force behind the decision to choose it. Does the latest Twitter publicity over their in house queue Starling falling down affect any existing design decisions. I am working on an app that will need a message queue to process some background tasks, I haven't done much of this, and most of the stuff I have seen in the past has been about Starling and Workling, and to be honest the application is not very big and

Can push notifications be used to run code without notifying user?

我们两清 提交于 2019-11-28 12:19:04
I have an app which needs to communicate with a server (to refresh it's data) once every 24 hours. This needs to happen even if the app is not open, nor in the background. Ideally what I'd like is: Every 24 hours, my server sends a push notification to iPad This wakes up the app, and runs the code necessary to refresh the data The notification is then discarded Is any of this possible? Is the app only woken up AFTER the user clicks on the notification? Or can I run some code before showing the notification? Can I even discard the notification message? If Push notifications are not the right

How to run a background job method at fixed intervals? [duplicate]

本小妞迷上赌 提交于 2019-11-28 10:24:55
This question already has an answer here: How to run a background task in a servlet based web application? 5 answers I am using JSP/Servlet on Apache Tomcat. I have to run a method every 10 minutes. How can I achieve this? As you're on Tomcat, which is just a barebones servletcontainer, you can't use EJB's @Schedule for this which is recommended by Java EE specification. Your best bet is then the ScheduledExecutorService from Java 1.5's java.util.concurrent package. You can trigger this with help of a ServletContextListener like follows: @WebListener public class BackgroundJobManager

Run background services on battery saver mode Android

血红的双手。 提交于 2019-11-28 10:07:00
I have a service for sending http request that runs on background and works fine on "normal mode". The problem is when I put my phone on "battery saver mode", the service not working. But, apps like Whatsapp still working. Do you have any idea what's going on? Mobile applications like Whatsapp must be requesting permission to exempt them from Doze/battery saving and App standby mode. It is possible to configure this manually by configuring the Whitelist in Settings > Battery > Battery Optimization . Alternatively from API 23, you can use permissions model to request users to whitelist them

Running Python Script as a Windows background process [duplicate]

丶灬走出姿态 提交于 2019-11-28 09:14:02
This question already has an answer here: How to run a python script in the background? 5 answers I have been trying to code a python script which reads data from a serial port. It worked well from the command line but I need it to run as a background process without any command line interface. The script has a while loop which reads the next byte of data from a serial port and simulates a key press accordingly. For the keypresses to be focused on the current window, instead of python command line, I need the script to run as a background process. I have read few answers here but nothing rang

run a shell script and immediately background it, however keep the ability to inspect its output

孤街醉人 提交于 2019-11-28 08:23:56
How can I run a shell script and immediately background it, however keep the ability to inspect its output any time by tailing /tmp/output.txt It would be nice if I can foreground the process too later. PS It would be really cool if you can also show me how to "send" the backgrounded process in to a gnu screen that may or may not have been initialized. To 'background' a process when you start it Simply add an ampersand ( & ) after the command. If the program writes to standard out, it will still write to your console/terminal. To foreground the process, simply use the fg command. (You can see

Run a php script as a background process in wamp server

若如初见. 提交于 2019-11-28 07:05:57
I have two php scripts that need to be run as continuous back ground processes in WAMP server. Wamp server is installed in window 7 PC. These scripts are already reside in separate folder in the www root directory. Apache Version :2.2.8 PHP Version :5.2.6 Since this is not a unix platform I can't use nohup php script.php > /dev/null & command to do this job. I'm looking for similar kind of command or method which works in wamp server windows platform. Can anyone explain the steps I need to be taken to do this task? create a batch file to run your php script using php executable "C:\wamp\php